avoid unncessary IO

This commit is contained in:
Joey Hess 2015-02-12 15:33:05 -04:00
parent ecf7ef3ff2
commit 52e40970c8
6 changed files with 15 additions and 17 deletions

View file

@ -66,10 +66,9 @@ global = do
home <- myHomeDir
ifM (doesFileExist $ home </> ".gitconfig")
( do
repo <- Git.Construct.fromUnknown
repo' <- withHandle StdoutHandle createProcessSuccess p $
hRead repo
return $ Just repo'
repo <- withHandle StdoutHandle createProcessSuccess p $
hRead (Git.Construct.fromUnknown)
return $ Just repo
, return Nothing
)
where