fix union merge to call diff-index with -- after the ref

Otherwise, if there's a file in the repo with a name matching the ref,
git could get confused and the merge not work.
This commit is contained in:
Joey Hess 2015-04-09 21:12:59 -04:00
parent 06211738c1
commit 2879adc551
2 changed files with 6 additions and 3 deletions

View file

@ -55,8 +55,8 @@ mergeTrees (Ref x) (Ref y) h = doMerge h $ "diff-tree":diffOpts ++ [x, y]
{- For merging a single tree into the index. -}
mergeTreeIndex :: Ref -> CatFileHandle -> Repo -> Streamer
mergeTreeIndex (Ref x) h = doMerge h $
"diff-index" : diffOpts ++ ["--cached", x]
mergeTreeIndex (Ref r) h = doMerge h $
"diff-index" : diffOpts ++ ["--cached", r, "--"]
diffOpts :: [String]
diffOpts = ["--raw", "-z", "-r", "--no-renames", "-l0"]

5
debian/changelog vendored
View file

@ -1,6 +1,9 @@
git-annex (5.20150410) UNRELEASED; urgency=medium
* Fix activity log parsing.
* Fix activity log parsing, which caused the log to not retain
activity from other uuids.
* Union merge could fall over if there was a file in the repository
with the same name as a git ref. Now fixed.
-- Joey Hess <id@joeyh.name> Thu, 09 Apr 2015 20:59:43 -0400