aboutsummaryrefslogtreecommitdiff
path: root/Git/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-12 15:33:05 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-12 15:33:44 -0400
commit329267cb2b11da52956a86d9caec5225251a5ac1 (patch)
treead86509598b515ed0529afc9f02c8076311f0004 /Git/Config.hs
parent15b68af5e7897d5747d21174ecaa682b69b90865 (diff)
avoid unncessary IO
Diffstat (limited to 'Git/Config.hs')
-rw-r--r--Git/Config.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Git/Config.hs b/Git/Config.hs
index 15109319a..44e0ad9a9 100644
--- a/Git/Config.hs
+++ b/Git/Config.hs
@@ -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