Fix a bug in find --branch in the previous version
inAnnex check was lost for that code path. To avoid more such mistakes, made withKeyOptions check it when the AnnexedFileSeeker specifies.
This commit is contained in:
parent
2d771a7d32
commit
00865cdae8
12 changed files with 20 additions and 14 deletions
|
@ -47,7 +47,7 @@ seek :: CopyOptions -> CommandSeek
|
|||
seek o = startConcurrency commandStages $ do
|
||||
case batchOption o of
|
||||
NoBatch -> withKeyOptions
|
||||
(keyOptions o) (autoMode o)
|
||||
(keyOptions o) (autoMode o) seeker
|
||||
(commandAction . Command.Move.startKey (fromToOptions o) Command.Move.RemoveNever)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (copyFiles o)
|
||||
|
|
|
@ -55,7 +55,7 @@ seek :: DropOptions -> CommandSeek
|
|||
seek o = startConcurrency commandStages $
|
||||
case batchOption o of
|
||||
Batch fmt -> batchAnnexedFilesMatching fmt seeker
|
||||
NoBatch -> withKeyOptions (keyOptions o) (autoMode o)
|
||||
NoBatch -> withKeyOptions (keyOptions o) (autoMode o) seeker
|
||||
(commandAction . startKeys o)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (dropFiles o)
|
||||
|
|
|
@ -65,7 +65,7 @@ seek o = do
|
|||
, usesLocationLog = False
|
||||
}
|
||||
case batchOption o of
|
||||
NoBatch -> withKeyOptions (keyOptions o) False
|
||||
NoBatch -> withKeyOptions (keyOptions o) False seeker
|
||||
(commandAction . startKeys o)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (findThese o)
|
||||
|
|
|
@ -97,7 +97,7 @@ seek o = startConcurrency commandStages $ do
|
|||
, checkContentPresent = Nothing
|
||||
, usesLocationLog = True
|
||||
}
|
||||
withKeyOptions (keyOptions o) False
|
||||
withKeyOptions (keyOptions o) False seeker
|
||||
(\kai -> commandAction . startKey from i kai =<< getNumCopies)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (fsckFiles o)
|
||||
|
|
|
@ -46,7 +46,7 @@ seek o = startConcurrency downloadStages $ do
|
|||
, usesLocationLog = True
|
||||
}
|
||||
case batchOption o of
|
||||
NoBatch -> withKeyOptions (keyOptions o) (autoMode o)
|
||||
NoBatch -> withKeyOptions (keyOptions o) (autoMode o) seeker
|
||||
(commandAction . startKeys from)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (getFiles o)
|
||||
|
@ -66,8 +66,7 @@ start o from file key = start' expensivecheck from key afile ai
|
|||
|
||||
startKeys :: Maybe Remote -> (Key, ActionItem) -> CommandStart
|
||||
startKeys from (key, ai) = checkFailedTransferDirection ai Download $
|
||||
stopUnless (not <$> inAnnex key) $
|
||||
start' (return True) from key (AssociatedFile Nothing) ai
|
||||
start' (return True) from key (AssociatedFile Nothing) ai
|
||||
|
||||
start' :: Annex Bool -> Maybe Remote -> Key -> AssociatedFile -> ActionItem -> CommandStart
|
||||
start' expensivecheck from key afile ai =
|
||||
|
|
|
@ -86,7 +86,7 @@ seek o = case batchOption o of
|
|||
GetAll -> withFilesInGitAnnex ww
|
||||
Set _ -> withFilesInGitAnnexNonRecursive ww
|
||||
"Not recursively setting metadata. Use --force to do that."
|
||||
withKeyOptions (keyOptions o) False
|
||||
withKeyOptions (keyOptions o) False seeker
|
||||
(commandAction . startKeys c o)
|
||||
(seekaction seeker)
|
||||
=<< workTreeItems ww (forFiles o)
|
||||
|
|
|
@ -42,7 +42,7 @@ instance DeferredParseClass MirrorOptions where
|
|||
|
||||
seek :: MirrorOptions -> CommandSeek
|
||||
seek o = startConcurrency stages $
|
||||
withKeyOptions (keyOptions o) False
|
||||
withKeyOptions (keyOptions o) False seeker
|
||||
(commandAction . startKey o (AssociatedFile Nothing))
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (mirrorFiles o)
|
||||
|
|
|
@ -61,7 +61,7 @@ seek o = startConcurrency stages $ do
|
|||
, usesLocationLog = False
|
||||
}
|
||||
case batchOption o of
|
||||
NoBatch -> withKeyOptions (keyOptions o) False
|
||||
NoBatch -> withKeyOptions (keyOptions o) False seeker
|
||||
(commandAction . startKey (fromToOptions o) (removeWhen o))
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (moveFiles o)
|
||||
|
|
|
@ -58,7 +58,7 @@ seek o = do
|
|||
}
|
||||
case batchOption o of
|
||||
NoBatch -> do
|
||||
withKeyOptions (keyOptions o) False
|
||||
withKeyOptions (keyOptions o) False seeker
|
||||
(commandAction . startKeys o m)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (whereisFiles o)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue