diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-09 21:12:59 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-09 21:13:28 -0400 |
commit | fc64015a7af4bbc531a1e4bc8741d86609b1f0bf (patch) | |
tree | 37a136342381279aefeb96a26b9bd8bc7f806954 /Git | |
parent | af27920956c9ef59052662389bff1ba40efd1ea0 (diff) |
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.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/UnionMerge.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/UnionMerge.hs b/Git/UnionMerge.hs index d4dc35e4a..780861a41 100644 --- a/Git/UnionMerge.hs +++ b/Git/UnionMerge.hs @@ -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"] |