I removed the now unnecessary forkProcess, but forgot to change back to
pipeBoth, so there was no writer thread.
This commit is contained in:
Joey Hess 2012-02-13 20:01:37 -04:00
parent 0ef6d86873
commit cad8824852

View file

@ -16,10 +16,9 @@ import qualified Git.Version
lookup :: String -> [FilePath] -> Repo -> IO [(FilePath, String)] lookup :: String -> [FilePath] -> Repo -> IO [(FilePath, String)]
lookup attr files repo = do lookup attr files repo = do
cwd <- getCurrentDirectory cwd <- getCurrentDirectory
(_, fromh, toh) <- hPipeBoth "git" (toCommand params) (_, r) <- pipeBoth "git" (toCommand params) $
hPutStr toh $ join "\0" $ input cwd join "\0" $ input cwd
hClose toh return $ zip files $ map attrvalue $ lines r
zip files . map attrvalue . lines <$> hGetContents fromh
where where
params = gitCommandLine params = gitCommandLine
[ Param "check-attr" [ Param "check-attr"