From 2ea34c47dd9819111f3cbaa2ce848581d286c05c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 6 Jul 2015 14:09:24 -0400 Subject: bugfix: Pass --full-tree when using git ls-files to get a list of files on the git-annex branch, so it works when run in a subdirectory. This bug affected git-annex unused, and potentially also transitions running code and other things. --- Annex/Branch.hs | 1 + debian/changelog | 4 ++++ doc/bugs/git-annex_unused_--from_s3_doesn__39__t.mdwn | 2 ++ .../comment_4_768cc5be3d9b53a45419d02f2cb25ec6._comment | 16 ++++++++++++++++ 4 files changed, 23 insertions(+) create mode 100644 doc/bugs/git-annex_unused_--from_s3_doesn__39__t/comment_4_768cc5be3d9b53a45419d02f2cb25ec6._comment diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 1a57e2342..286eb0558 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -316,6 +316,7 @@ files = do branchFiles :: Annex [FilePath] branchFiles = withIndex $ inRepo $ Git.Command.pipeNullSplitZombie [ Param "ls-tree" + , Param "--full-tree" , Param "--name-only" , Param "-r" , Param "-z" diff --git a/debian/changelog b/debian/changelog index 795921a9e..51ff7fe14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,10 @@ git-annex (5.20150618) UNRELEASED; urgency=medium * Brought back the setkey plumbing command that was removed in 2011, since we found a use case for it. Note that the command's syntax was changed for consistency. + * bugfix: Pass --full-tree when using git ls-files to get a list of files + on the git-annex branch, so it works when run in a subdirectory. + This bug affected git-annex unused, and potentially also transitions + running code and other things. -- Joey Hess Thu, 02 Jul 2015 12:31:14 -0400 diff --git a/doc/bugs/git-annex_unused_--from_s3_doesn__39__t.mdwn b/doc/bugs/git-annex_unused_--from_s3_doesn__39__t.mdwn index 07ae44e89..7e82fb013 100644 --- a/doc/bugs/git-annex_unused_--from_s3_doesn__39__t.mdwn +++ b/doc/bugs/git-annex_unused_--from_s3_doesn__39__t.mdwn @@ -27,3 +27,5 @@ arch linux x86_64 ### Please provide any additional information below. The S3 remote is encrypted with the default "hybrid" method + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/git-annex_unused_--from_s3_doesn__39__t/comment_4_768cc5be3d9b53a45419d02f2cb25ec6._comment b/doc/bugs/git-annex_unused_--from_s3_doesn__39__t/comment_4_768cc5be3d9b53a45419d02f2cb25ec6._comment new file mode 100644 index 000000000..7a09095e0 --- /dev/null +++ b/doc/bugs/git-annex_unused_--from_s3_doesn__39__t/comment_4_768cc5be3d9b53a45419d02f2cb25ec6._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2015-07-06T18:00:53Z" + content=""" +Analysis: To find the keys, it's using git ls-tree git-annex. When this is +run in a subdirectory, it only lists files in the branch located under that +subdirectory. Which is no files. It should pass --full-tree to avoid that +problem. + +Pretty much everywhere git-annex uses ls-tree, it does pass --full-tree. +But not in this particular case. Anything using Annex.Branch.branchFiles or +Annex.Branch.files would be affected; that's limited to git-annex unused +and code that runs transitions. git-annex unused w/o --from could also be +affected, I think, perhaps it's harder to trigger that though. +"""]] -- cgit v1.2.3