summaryrefslogtreecommitdiff
path: root/Git/CurrentRepo.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-05-19 10:51:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-05-19 11:08:50 -0400
commitebbd24e5ed6bbb41305d8105d7fac355dcf15bbc (patch)
treeb97c41c31ceab8ccf89ed1cf20d86915b4270283 /Git/CurrentRepo.hs
parent9d9814477601217c8d39d75cc03e27ee4d734de3 (diff)
more worktree improvements
Avoid more expensive code path when no core.worktree is configured. Don't change worktree when reading config if one is already set. This could happen if GIT_CORE_WORKTREE is set, and the repo also has core.worktree, and the config is reread. Now GIT_CORE_WORKTREE will prevail.
Diffstat (limited to 'Git/CurrentRepo.hs')
-rw-r--r--Git/CurrentRepo.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/CurrentRepo.hs b/Git/CurrentRepo.hs
index a40b412f5..de11ce217 100644
--- a/Git/CurrentRepo.hs
+++ b/Git/CurrentRepo.hs
@@ -31,7 +31,7 @@ get :: IO Repo
get = do
gd <- pathenv "GIT_DIR"
r <- configure gd =<< maybe fromCwd fromPath gd
- wt <- maybe (worktree $ location r) Just <$> pathenv "GIT_WORK_TREE"
+ wt <- maybe (Git.Config.workTree r) Just <$> pathenv "GIT_WORK_TREE"
case wt of
Nothing -> return r
Just d -> do