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:
Joey Hess 2012-10-17 14:28:05 -04:00
parent 19371138cc
commit e6b1f36e1d
2 changed files with 7 additions and 1 deletions

View file

@ -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

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
git-annex (3.20121018) UNRELEASED; urgency=low
* Fix handling of GIT_DIR when it refers to a git submodule.
-- Joey Hess <joeyh@debian.org> Wed, 17 Oct 2012 14:24:10 -0400
git-annex (3.20121017) unstable; urgency=low
* Fix zombie cleanup reversion introduced in 3.20121009.