unify batch mode with non-batch by using AnnexedFileSeeker
This commit is contained in:
parent
d9ae6ab0b4
commit
1be92381ec
23 changed files with 70 additions and 74 deletions
|
@ -40,19 +40,17 @@ optParser desc = GetOptions
|
|||
seek :: GetOptions -> CommandSeek
|
||||
seek o = startConcurrency downloadStages $ do
|
||||
from <- maybe (pure Nothing) (Just <$$> getParsed) (getFrom o)
|
||||
let go = start o from
|
||||
let seeker = AnnexedFileSeeker
|
||||
{ seekAction = commandAction' go
|
||||
{ startAction = start o from
|
||||
, checkContentPresent = Just False
|
||||
, usesLocationLog = True
|
||||
}
|
||||
case batchOption o of
|
||||
Batch fmt -> batchFilesMatching fmt
|
||||
(whenAnnexed go . toRawFilePath)
|
||||
NoBatch -> withKeyOptions (keyOptions o) (autoMode o)
|
||||
(commandAction . startKeys from)
|
||||
(withFilesInGitAnnex ww seeker)
|
||||
=<< workTreeItems ww (getFiles o)
|
||||
Batch fmt -> batchAnnexedFilesMatching fmt seeker
|
||||
where
|
||||
ww = WarnUnmatchLsFiles
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue