From 2c7c9811b3253e293535680762709adacecc0f2a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Oct 2012 14:28:05 -0400 Subject: 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. --- Git/CurrentRepo.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Git') 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 -- cgit v1.2.3