fishy commit
This commit is contained in:
parent
89dad12b35
commit
e0095b0bdc
7 changed files with 9 additions and 9 deletions
|
@ -242,7 +242,7 @@ cleanObjectLoc key = do
|
||||||
removeparents file n = do
|
removeparents file n = do
|
||||||
let dir = parentDir file
|
let dir = parentDir file
|
||||||
maybe noop (const $ removeparents dir (n-1))
|
maybe noop (const $ removeparents dir (n-1))
|
||||||
=<< catchMaybeIO (removeDirectory dir)
|
<=< catchMaybeIO $ removeDirectory dir
|
||||||
|
|
||||||
{- Removes a key's file from .git/annex/objects/ -}
|
{- Removes a key's file from .git/annex/objects/ -}
|
||||||
removeAnnex :: Key -> Annex ()
|
removeAnnex :: Key -> Annex ()
|
||||||
|
|
|
@ -23,13 +23,13 @@ import Config
|
||||||
addCommand :: String -> [CommandParam] -> [FilePath] -> Annex ()
|
addCommand :: String -> [CommandParam] -> [FilePath] -> Annex ()
|
||||||
addCommand command params files = do
|
addCommand command params files = do
|
||||||
q <- get
|
q <- get
|
||||||
store =<< inRepo (Git.Queue.addCommand command params files q)
|
store <=< inRepo $ Git.Queue.addCommand command params files q
|
||||||
|
|
||||||
{- Adds an update-index stream to the queue. -}
|
{- Adds an update-index stream to the queue. -}
|
||||||
addUpdateIndex :: Git.UpdateIndex.Streamer -> Annex ()
|
addUpdateIndex :: Git.UpdateIndex.Streamer -> Annex ()
|
||||||
addUpdateIndex streamer = do
|
addUpdateIndex streamer = do
|
||||||
q <- get
|
q <- get
|
||||||
store =<< inRepo (Git.Queue.addUpdateIndex streamer q)
|
store <=< inRepo $ Git.Queue.addUpdateIndex streamer q
|
||||||
|
|
||||||
{- Runs the queue if it is full. Should be called periodically. -}
|
{- Runs the queue if it is full. Should be called periodically. -}
|
||||||
flushWhenFull :: Annex ()
|
flushWhenFull :: Annex ()
|
||||||
|
|
|
@ -22,7 +22,7 @@ seek = [withNothing start]
|
||||||
start :: CommandStart
|
start :: CommandStart
|
||||||
start = next $ next $ do
|
start = next $ next $ do
|
||||||
Annex.Branch.commit "update"
|
Annex.Branch.commit "update"
|
||||||
_ <- runhook =<< inRepo (Git.hookPath "annex-content")
|
_ <- runhook <=< inRepo $ Git.hookPath "annex-content"
|
||||||
return True
|
return True
|
||||||
where
|
where
|
||||||
runhook (Just hook) = liftIO $ boolSystem hook []
|
runhook (Just hook) = liftIO $ boolSystem hook []
|
||||||
|
|
|
@ -84,7 +84,7 @@ checkRemoteUnused name = go =<< fromJust <$> Remote.byName (Just name)
|
||||||
_ <- check "" (remoteUnusedMsg r) (remoteunused r) 0
|
_ <- check "" (remoteUnusedMsg r) (remoteunused r) 0
|
||||||
next $ return True
|
next $ return True
|
||||||
remoteunused r =
|
remoteunused r =
|
||||||
excludeReferenced =<< loggedKeysFor (Remote.uuid r)
|
excludeReferenced <=< loggedKeysFor $ Remote.uuid r
|
||||||
|
|
||||||
check :: FilePath -> ([(Int, Key)] -> String) -> Annex [Key] -> Int -> Annex Int
|
check :: FilePath -> ([(Int, Key)] -> String) -> Annex [Key] -> Int -> Annex Int
|
||||||
check file msg a c = do
|
check file msg a c = do
|
||||||
|
@ -260,7 +260,7 @@ withKeysReferencedInGit a = do
|
||||||
withKeysReferencedInGitRef :: (Key -> Annex ()) -> Git.Ref -> Annex ()
|
withKeysReferencedInGitRef :: (Key -> Annex ()) -> Git.Ref -> Annex ()
|
||||||
withKeysReferencedInGitRef a ref = do
|
withKeysReferencedInGitRef a ref = do
|
||||||
showAction $ "checking " ++ Git.Ref.describe ref
|
showAction $ "checking " ++ Git.Ref.describe ref
|
||||||
go =<< inRepo (LsTree.lsTree ref)
|
go <=< inRepo $ LsTree.lsTree ref
|
||||||
where
|
where
|
||||||
go [] = noop
|
go [] = noop
|
||||||
go (l:ls)
|
go (l:ls)
|
||||||
|
|
|
@ -100,7 +100,7 @@ rsyncUrls o k = map use annexHashes
|
||||||
f = keyFile k
|
f = keyFile k
|
||||||
|
|
||||||
store :: RsyncOpts -> Key -> Annex Bool
|
store :: RsyncOpts -> Key -> Annex Bool
|
||||||
store o k = rsyncSend o k =<< inRepo (gitAnnexLocation k)
|
store o k = rsyncSend o k <=< inRepo $ gitAnnexLocation k
|
||||||
|
|
||||||
storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> Annex Bool
|
storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> Annex Bool
|
||||||
storeEncrypted o (cipher, enck) k = withTmp enck $ \tmp -> do
|
storeEncrypted o (cipher, enck) k = withTmp enck $ \tmp -> do
|
||||||
|
|
2
Seek.hs
2
Seek.hs
|
@ -95,7 +95,7 @@ withValue v a params = do
|
||||||
-}
|
-}
|
||||||
withField :: Option -> (Maybe String -> Annex a) -> (a -> CommandSeek) -> CommandSeek
|
withField :: Option -> (Maybe String -> Annex a) -> (a -> CommandSeek) -> CommandSeek
|
||||||
withField option converter = withValue $
|
withField option converter = withValue $
|
||||||
converter =<< Annex.getField (Option.name option)
|
converter <=< Annex.getField $ Option.name option
|
||||||
|
|
||||||
withFlag :: Option -> (Bool -> CommandSeek) -> CommandSeek
|
withFlag :: Option -> (Bool -> CommandSeek) -> CommandSeek
|
||||||
withFlag option = withValue $ Annex.getFlag (Option.name option)
|
withFlag option = withValue $ Annex.getFlag (Option.name option)
|
||||||
|
|
|
@ -84,7 +84,7 @@ inject source dest = do
|
||||||
|
|
||||||
logFiles :: FilePath -> Annex [FilePath]
|
logFiles :: FilePath -> Annex [FilePath]
|
||||||
logFiles dir = return . filter (".log" `isSuffixOf`)
|
logFiles dir = return . filter (".log" `isSuffixOf`)
|
||||||
=<< liftIO (getDirectoryContents dir)
|
<=< liftIO $ getDirectoryContents dir
|
||||||
|
|
||||||
push :: Annex ()
|
push :: Annex ()
|
||||||
push = do
|
push = do
|
||||||
|
|
Loading…
Reference in a new issue