diff options
Diffstat (limited to 'Git/LsTree.hs')
-rw-r--r-- | Git/LsTree.hs | 9 |
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] |