summaryrefslogtreecommitdiff
path: root/Git/CurrentRepo.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-15 23:12:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-15 23:12:50 -0400
commit5fb6e3b804dccf5b727100eb139e289ad6bc0770 (patch)
treecc6d315f6dc656e901edf2c89946251c73bdc246 /Git/CurrentRepo.hs
parentf691ab0ec72baed7194aebbb019679d33fd60c0b (diff)
simplify
Diffstat (limited to 'Git/CurrentRepo.hs')
-rw-r--r--Git/CurrentRepo.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Git/CurrentRepo.hs b/Git/CurrentRepo.hs
index de11ce217..861df1b64 100644
--- a/Git/CurrentRepo.hs
+++ b/Git/CurrentRepo.hs
@@ -42,11 +42,11 @@ get = do
where
pathenv s = do
v <- getEnv s
- when (isJust v) $
- unsetEnv s
case v of
+ Just d -> do
+ unsetEnv s
+ Just <$> absPath d
Nothing -> return Nothing
- Just d -> Just <$> absPath d
configure Nothing r = Git.Config.read r
configure (Just d) r = do
r' <- Git.Config.read r