wait for git lstree to exit

This commit is contained in:
Joey Hess 2016-01-01 15:50:59 -04:00
parent 70fee8208c
commit f7256842cc
Failed to extract signature
3 changed files with 13 additions and 12 deletions

View file

@ -1,6 +1,6 @@
{- git ls-tree interface
-
- Copyright 2011 Joey Hess <id@joeyh.name>
- Copyright 2011-2016 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@ -32,9 +32,10 @@ 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 (lsTreeParams t []) repo
lsTree :: Ref -> Repo -> IO ([TreeItem], IO Bool)
lsTree t repo = do
(l, cleanup) <- pipeNullSplit (lsTreeParams t []) repo
return (map parseLsTree l, cleanup)
lsTreeParams :: Ref -> [CommandParam] -> [CommandParam]
lsTreeParams r ps =