diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-23 14:04:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-23 14:04:09 -0400 |
commit | e0aff931023a6c3f7a06caaa5dfa1aad2da3889d (patch) | |
tree | f1960ca033d5196da417e7c4d1f0e579bdc21e46 /Git/UpdateIndex.hs | |
parent | 232fce59fabc4243c9b9d7944589986c5cc73f16 (diff) | |
download | git-repair-e0aff931023a6c3f7a06caaa5dfa1aad2da3889d.tar.gz |
merge from git-annex
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 6d1ff25..4ecd773 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. -} |