summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-17 14:28:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-17 14:28:05 -0400
commit2c7c9811b3253e293535680762709adacecc0f2a (patch)
tree518a3a4df3df5ed196644524457f48c42f9d38ae /Git
parent551166cfc55e491e43fc44ae5ecb84701aff4a6d (diff)
Fix handling of GIT_DIR when it refers to a git submodule.
The old code was just wrong in taking fromPath of GIT_DIR -- that made an localUnknown location with the GIT_DIR in it, which only worked by accident, and failed in submodules.
Diffstat (limited to 'Git')
-rw-r--r--Git/CurrentRepo.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/CurrentRepo.hs b/Git/CurrentRepo.hs
index 908cc389e..29bb28177 100644
--- a/Git/CurrentRepo.hs
+++ b/Git/CurrentRepo.hs
@@ -30,7 +30,7 @@ import qualified Git.Config
get :: IO Repo
get = do
gd <- pathenv "GIT_DIR"
- r <- configure gd =<< maybe fromCwd fromPath gd
+ r <- configure gd =<< fromCwd
wt <- maybe (worktree $ location r) Just <$> pathenv "GIT_WORK_TREE"
case wt of
Nothing -> return r