diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-02-23 16:36:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-02-23 16:36:38 -0400 |
commit | 86466c88e6b0d504f14821f38e22e65d6465fe9d (patch) | |
tree | 972d5a3b055fb5e887279e2fa22463f0d9a461b0 /Git/LsTree.hs | |
parent | 462217110db8f07463b28bb77dcbdb7c773eff49 (diff) |
add mktree interface
Diffstat (limited to 'Git/LsTree.hs')
-rw-r--r-- | Git/LsTree.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Git/LsTree.hs b/Git/LsTree.hs index b1d9190d0..f4b6a781e 100644 --- a/Git/LsTree.hs +++ b/Git/LsTree.hs @@ -8,9 +8,10 @@ module Git.LsTree ( TreeItem(..), lsTree, + lsTree', lsTreeParams, lsTreeFiles, - parseLsTree + parseLsTree, ) where import Common @@ -33,8 +34,11 @@ data TreeItem = TreeItem {- Lists the complete contents of a tree, recursing into sub-trees, - with lazy output. -} lsTree :: Ref -> Repo -> IO ([TreeItem], IO Bool) -lsTree t repo = do - (l, cleanup) <- pipeNullSplit (lsTreeParams t []) repo +lsTree = lsTree' [] + +lsTree' :: [CommandParam] -> Ref -> Repo -> IO ([TreeItem], IO Bool) +lsTree' ps t repo = do + (l, cleanup) <- pipeNullSplit (lsTreeParams t ps) repo return (map parseLsTree l, cleanup) lsTreeParams :: Ref -> [CommandParam] -> [CommandParam] |