diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-04 15:00:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-04 15:00:19 -0400 |
commit | 8496d8aa633366efc7f0e2a046e3748dd5600904 (patch) | |
tree | 04870b230e1f0eedf198d6a1c289547e63219805 /Git/UpdateIndex.hs | |
parent | 85214c23fcda334d6fa7062ffe5bb4c11510bd84 (diff) |
improved direct mode dir/file conflicted merge resultion, using tree grafting
Diffstat (limited to 'Git/UpdateIndex.hs')
-rw-r--r-- | Git/UpdateIndex.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Git/UpdateIndex.hs b/Git/UpdateIndex.hs index 6d1ff25486..4ecd773630 100644 --- a/Git/UpdateIndex.hs +++ b/Git/UpdateIndex.hs @@ -15,6 +15,7 @@ module Git.UpdateIndex ( startUpdateIndex, stopUpdateIndex, lsTree, + lsSubTree, updateIndexLine, stageFile, unstageFile, @@ -74,6 +75,13 @@ lsTree (Ref x) repo streamer = do void $ cleanup where params = map Param ["ls-tree", "-z", "-r", "--full-tree", x] +lsSubTree :: Ref -> FilePath -> Repo -> Streamer +lsSubTree (Ref x) p repo streamer = do + (s, cleanup) <- pipeNullSplit params repo + mapM_ streamer s + void $ cleanup + where + params = map Param ["ls-tree", "-z", "-r", "--full-tree", x, p] {- Generates a line suitable to be fed into update-index, to add - a given file with a given sha. -} |