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!
This commit is contained in:
Joey Hess 2015-04-09 21:21:35 -04:00
parent 2879adc551
commit d3d92abf95
2 changed files with 3 additions and 3 deletions

View file

@ -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. -}

View file

@ -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