better limiting of start actions to only run whenAnnexed
Mostly only refactoring, but this does remove one redundant stat of the symlink by copy.
This commit is contained in:
parent
4389782628
commit
b327227ba5
16 changed files with 67 additions and 63 deletions
|
@ -25,10 +25,13 @@ def :: [Command]
|
|||
def = [command "fsck" paramPaths seek "check for problems"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
seek = [withNumCopies start, withBarePresentKeys startBare]
|
||||
seek =
|
||||
[ withNumCopies $ \n -> whenAnnexed $ start n
|
||||
, withBarePresentKeys startBare
|
||||
]
|
||||
|
||||
start :: FilePath -> Maybe Int -> CommandStart
|
||||
start file numcopies = isAnnexed file $ \(key, backend) -> do
|
||||
start :: Maybe Int -> FilePath -> (Key, Backend Annex) -> CommandStart
|
||||
start numcopies file (key, backend) = do
|
||||
showStart "fsck" file
|
||||
next $ perform key file backend numcopies
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue