diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-09 21:21:35 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-09 21:22:35 -0400 |
commit | efd2eaa1cfbefd25778519361121a386a9f40af7 (patch) | |
tree | 0716d4db9840a7ea5902768a8d47e1e7ddf27ee8 /Git | |
parent | fc64015a7af4bbc531a1e4bc8741d86609b1f0bf (diff) |
spotted a few more places where diff-tree needed --
None of these are very likely at all to ever be ambiguous, since tree
refs almost never have symbolic names and the sha is very unlikely
to be in the work tree.. But, let's get it right!
Diffstat (limited to 'Git')
-rw-r--r-- | Git/DiffTree.hs | 4 | ||||
-rw-r--r-- | Git/UnionMerge.hs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Git/DiffTree.hs b/Git/DiffTree.hs index 5cdcc16bc..5dd4bde2d 100644 --- a/Git/DiffTree.hs +++ b/Git/DiffTree.hs @@ -36,12 +36,12 @@ isDiffOf diff f = case getTopFilePath f of {- Diffs two tree Refs. -} diffTree :: Ref -> Ref -> Repo -> IO ([DiffTreeItem], IO Bool) diffTree src dst = getdiff (Param "diff-tree") - [Param (fromRef src), Param (fromRef dst)] + [Param (fromRef src), Param (fromRef dst), Param "--"] {- Diffs two tree Refs, recursing into sub-trees -} diffTreeRecursive :: Ref -> Ref -> Repo -> IO ([DiffTreeItem], IO Bool) diffTreeRecursive src dst = getdiff (Param "diff-tree") - [Param "-r", Param (fromRef src), Param (fromRef dst)] + [Param "-r", Param (fromRef src), Param (fromRef dst), Param "--"] {- Diffs between a tree and the index. Does nothing if there is not yet a - commit in the repository. -} diff --git a/Git/UnionMerge.hs b/Git/UnionMerge.hs index 780861a41..26bb3d39f 100644 --- a/Git/UnionMerge.hs +++ b/Git/UnionMerge.hs @@ -51,7 +51,7 @@ mergeIndex h repo bs = forM_ bs $ \b -> {- For merging two trees. -} mergeTrees :: Ref -> Ref -> CatFileHandle -> Repo -> Streamer -mergeTrees (Ref x) (Ref y) h = doMerge h $ "diff-tree":diffOpts ++ [x, y] +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 |