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. -}
|
||||
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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue