diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-04 18:04:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-04 18:04:09 -0400 |
commit | cedb6dc503441bfe54881ec646d86dd777635e7d (patch) | |
tree | 7643d8ca5248b750b99b7c6aeaea4205137127fc /Git/Ref.hs | |
parent | 929f2a0df8f76caa21f94ea3afe8afc1d2dba14e (diff) |
make a pipeReadStrict, that properly waits on the process
Nearly everything that's reading from git is operating on a small
amount of output and has been switched to use that. Only pipeNullSplit
stuff continues using the lazy version that yields zombies.
Diffstat (limited to 'Git/Ref.hs')
-rw-r--r-- | Git/Ref.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/Ref.hs b/Git/Ref.hs index cfaafacef..6fec46c22 100644 --- a/Git/Ref.hs +++ b/Git/Ref.hs @@ -41,7 +41,7 @@ exists ref = runBool "show-ref" sha :: Branch -> Repo -> IO (Maybe Sha) sha branch repo = process <$> showref repo where - showref = pipeRead [Param "show-ref", + showref = pipeReadStrict [Param "show-ref", Param "--hash", -- get the hash Param $ show branch] process [] = Nothing @@ -50,7 +50,7 @@ sha branch repo = process <$> showref repo {- List of (refs, branches) matching a given ref spec. -} matching :: Ref -> Repo -> IO [(Ref, Branch)] matching ref repo = map gen . lines <$> - pipeRead [Param "show-ref", Param $ show ref] repo + pipeReadStrict [Param "show-ref", Param $ show ref] repo where gen l = let (r, b) = separate (== ' ') l in (Ref r, Ref b) |