]> dgit.raspbian.org Git - git-annex.git/commitdiff
Fix a bug in find --batch in the previous version.
authorJoey Hess <joeyh@joeyh.name>
Mon, 20 Jul 2020 23:39:05 +0000 (19:39 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 20 Jul 2020 23:50:53 +0000 (19:50 -0400)
CHANGELOG
Command/Find.hs
doc/bugs/find_--batch_reports_files_that_have_no_content.mdwn
doc/todo/precache_logs_for_speed_with_cat-file_--buffer.mdwn
git-annex.cabal

index 9f75557995ce5e307f066e529f67f78dda0902f6..6b32db0c4c624c14448fc4a67b38455e92ab7a0c 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,9 @@
+git-annex (8.20200720.1) UNRELEASED; urgency=medium
+
+  * Fix a bug in find --batch in the previous version.
+
+ -- Joey Hess <id@joeyh.name>  Mon, 20 Jul 2020 19:37:40 -0400
+
 git-annex (8.20200720) upstream; urgency=medium
 
   * import: Added --no-content option, which avoids downloading files
index 9c1f33628365badc667cc96e10939d750a10bd4d..337ad110fde550d07d52cb5cb5381bb95391d2b0 100644 (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
index 8c481401a0779d247b29d3e037735e1e72c4e08f..8a56afc0d05a34f41d57aee61f3ac712cecabf37 100644 (file)
@@ -61,3 +61,8 @@ local repository version: 8
 
 [[!meta author=kyle]]
 [[!tag projects/datalad]]
+
+> [[fixed|done]], and audited for any other similar reversions.
+> 
+> Unfortunately did not see this bug before the release,
+> so I should make a point release for it. --[[Joey]]
index 0bae6e00bd63747563cf1bce4f04b90d0584f32f..264617877e400a4fe455e0b42d3ad478a7cad24e 100644 (file)
@@ -37,8 +37,12 @@ and precache them.
 > > > Still todo:
 > > > 
 > > > * move, copy, drop, and mirror were left not using the location log caching yet
+> > > * find has a bit of ugliness around batch mode, and this shows it
+> > >   would be worth making the batch mode take the same AnnexedFileSeeker,
+> > >   to reunify the batch and non-batch code
 > > > * get is left with an unncessary inAnnex check so could be sped up
-> > >   a little bit more
+> > >   a little bit more. Above improvements to batch mode would allow
+> > >   fixing this.
 > > > 
 
 Another thing that the same cat-file --buffer approach could be used with
index 6218627808e7230bc9f313daf69894e0fbb41a42..e679a347b9c380be3260bfd082294e65c6485b89 100644 (file)
@@ -1,5 +1,5 @@
 Name: git-annex
-Version: 8.20200720
+Version: 8.20200720.1
 Cabal-Version: >= 1.10
 License: AGPL-3
 Maintainer: Joey Hess <id@joeyh.name>