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.
This commit is contained in:
parent
19371138cc
commit
e6b1f36e1d
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue