A relative core.worktree is relative to the gitdir.

Now that this is handled correctly, git-annex can be used in git submodules.

Also, fixed infelicity where Git.CurrentRepo and Git.Config.updateLocation
were both dealing with core.worktree. Now updateLocation handles it for
Local as well as for LocalUnknown repos.
This commit is contained in:
Joey Hess 2012-10-16 00:02:14 -04:00
parent 148d9f0088
commit 8fec62d299
4 changed files with 21 additions and 15 deletions

View file

@ -31,7 +31,7 @@ get :: IO Repo
get = do
gd <- pathenv "GIT_DIR"
r <- configure gd =<< maybe fromCwd fromPath gd
wt <- maybe (Git.Config.workTree r) Just <$> pathenv "GIT_WORK_TREE"
wt <- maybe (worktree $ location r) Just <$> pathenv "GIT_WORK_TREE"
case wt of
Nothing -> return r
Just d -> do