Fix a bug in find --batch in the previous version.

This commit is contained in:
Joey Hess 2020-07-20 19:39:05 -04:00
parent 8499c6d65a
commit abd56fb019
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 20 additions and 3 deletions

View file

@ -18,6 +18,7 @@ import Types.Key
import Git.FilePath
import qualified Utility.Format
import Utility.DataUnits
import Annex.Content
cmd :: Command
cmd = notBareRepo $ withGlobalOptions [annexedMatchingOptions] $ mkCommand $
@ -70,9 +71,10 @@ seek o = case batchOption o of
(withFilesInGitAnnex ww seeker)
=<< workTreeItems ww (findThese o)
Batch fmt -> batchFilesMatching fmt
(whenAnnexed go . toRawFilePath)
(whenAnnexed gobatch . toRawFilePath)
where
go = start o
gobatch f k = stopUnless (limited <||> inAnnex k) (go f k)
ww = WarnUnmatchLsFiles
start :: FindOptions -> RawFilePath -> Key -> CommandStart