summaryrefslogtreecommitdiff
path: root/Git/LsTree.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-21 15:28:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-21 15:28:06 -0400
commit727566ad23efc6c36a4a4473b3299af913f6ce03 (patch)
tree8dd85a47703021db232b02e47d371037cb0715c3 /Git/LsTree.hs
parent1f7604f7d9df831012893a9ee2b4a8be20fe02ab (diff)
implemented removal of corrupt tracking branches
Oh, git, you made this so hard. Not determining if a branch pointed to some corrupt object, that was easy, but dealing with corrupt branches using git plumbing is a PITA.
Diffstat (limited to 'Git/LsTree.hs')
-rw-r--r--Git/LsTree.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Git/LsTree.hs b/Git/LsTree.hs
index a2b47da3a..956f9f5b4 100644
--- a/Git/LsTree.hs
+++ b/Git/LsTree.hs
@@ -8,6 +8,7 @@
module Git.LsTree (
TreeItem(..),
lsTree,
+ lsTreeParams,
lsTreeFiles,
parseLsTree
) where
@@ -33,9 +34,11 @@ data TreeItem = TreeItem
{- Lists the complete contents of a tree, recursing into sub-trees,
- with lazy output. -}
lsTree :: Ref -> Repo -> IO [TreeItem]
-lsTree t repo = map parseLsTree <$> pipeNullSplitZombie ps repo
- where
- ps = [Params "ls-tree --full-tree -z -r --", File $ show t]
+lsTree t repo = map parseLsTree
+ <$> pipeNullSplitZombie (lsTreeParams t) repo
+
+lsTreeParams :: Ref -> [CommandParam]
+lsTreeParams t = [ Params "ls-tree --full-tree -z -r --", File $ show t ]
{- Lists specified files in a tree. -}
lsTreeFiles :: Ref -> [FilePath] -> Repo -> IO [TreeItem]