summaryrefslogtreecommitdiff
path: root/Git/UnionMerge.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-09 21:12:59 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-09 21:13:28 -0400
commitfc64015a7af4bbc531a1e4bc8741d86609b1f0bf (patch)
tree37a136342381279aefeb96a26b9bd8bc7f806954 /Git/UnionMerge.hs
parentaf27920956c9ef59052662389bff1ba40efd1ea0 (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/UnionMerge.hs')
-rw-r--r--Git/UnionMerge.hs4
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"]