summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-06 14:09:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-06 14:09:54 -0400
commit2ea34c47dd9819111f3cbaa2ce848581d286c05c (patch)
treeb3cc25b3b1c4e8d591394fa0d14817d4cae4424b
parent83d0d7b74894be4ef8a655478deb106177839b1c (diff)
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.
-rw-r--r--Annex/Branch.hs1
-rw-r--r--debian/changelog4
-rw-r--r--doc/bugs/git-annex_unused_--from_s3_doesn__39__t.mdwn2
-rw-r--r--doc/bugs/git-annex_unused_--from_s3_doesn__39__t/comment_4_768cc5be3d9b53a45419d02f2cb25ec6._comment16
4 files changed, 23 insertions, 0 deletions
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 <id@joeyh.name> 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.
+"""]]