aboutsummaryrefslogtreecommitdiff
path: root/Annex/GitOverlay.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-05-22 14:58:04 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-05-22 15:02:55 -0400
commit58da8089e614ad73b8e2b69a701b2cea620af56b (patch)
treee100c07c9158a9fcbb86f18cbed6ee9a95d25068 /Annex/GitOverlay.hs
parentd2c2e3a11f49c539606c2a7f78c7503e7d3f3457 (diff)
git's handing of relative GIT_INDEX_FILE is more insane than I thought; always make absolute
This is actually worse than I thought; when git is being run with a detached work tree, GIT_INDEX_FILE is treated as a path relative to CWD, instead of the normal behavior of relative the top of the work tree. This seems to make it basically impossible for any program that wants to use GIT_INDEX_FILE to use anything other than an absolute path to it; there are too many configurations to keep straight that can change how git interprets what should be a simple relative path to a file. (I have complained to the git developers.)
Diffstat (limited to 'Annex/GitOverlay.hs')
-rw-r--r--Annex/GitOverlay.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Annex/GitOverlay.hs b/Annex/GitOverlay.hs
index 2eae5e7fe..2193b7449 100644
--- a/Annex/GitOverlay.hs
+++ b/Annex/GitOverlay.hs
@@ -19,7 +19,7 @@ import qualified Annex
{- Runs an action using a different git index file. -}
withIndexFile :: FilePath -> Annex a -> Annex a
withIndexFile f a = do
- f' <- inRepo $ indexEnvVal f
+ f' <- liftIO $ indexEnvVal f
withAltRepo
(\g -> addGitEnv g indexEnv f')
(\g g' -> g' { gitEnv = gitEnv g })