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:
parent
06211738c1
commit
2879adc551
2 changed files with 6 additions and 3 deletions
|
@ -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. -}
|
{- For merging a single tree into the index. -}
|
||||||
mergeTreeIndex :: Ref -> CatFileHandle -> Repo -> Streamer
|
mergeTreeIndex :: Ref -> CatFileHandle -> Repo -> Streamer
|
||||||
mergeTreeIndex (Ref x) h = doMerge h $
|
mergeTreeIndex (Ref r) h = doMerge h $
|
||||||
"diff-index" : diffOpts ++ ["--cached", x]
|
"diff-index" : diffOpts ++ ["--cached", r, "--"]
|
||||||
|
|
||||||
diffOpts :: [String]
|
diffOpts :: [String]
|
||||||
diffOpts = ["--raw", "-z", "-r", "--no-renames", "-l0"]
|
diffOpts = ["--raw", "-z", "-r", "--no-renames", "-l0"]
|
||||||
|
|
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,6 +1,9 @@
|
||||||
git-annex (5.20150410) UNRELEASED; urgency=medium
|
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
|
-- Joey Hess <id@joeyh.name> Thu, 09 Apr 2015 20:59:43 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue