aboutsummaryrefslogtreecommitdiff
path: root/Annex/GitOverlay.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/GitOverlay.hs')
-rw-r--r--Annex/GitOverlay.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Annex/GitOverlay.hs b/Annex/GitOverlay.hs
index e33d8a83c..8cc1e04d1 100644
--- a/Annex/GitOverlay.hs
+++ b/Annex/GitOverlay.hs
@@ -17,9 +17,13 @@ import qualified Annex
{- Runs an action using a different git index file. -}
withIndexFile :: FilePath -> Annex a -> Annex a
-withIndexFile f = withAltRepo
- (\g -> addGitEnv g "GIT_INDEX_FILE" f)
- (\g g' -> g' { gitEnv = gitEnv g })
+withIndexFile f a = do
+ -- Workaround http://thread.gmane.org/gmane.comp.version-control.git/294880
+ absf <- liftIO $ absPath f
+ withAltRepo
+ (\g -> addGitEnv g "GIT_INDEX_FILE" absf)
+ (\g g' -> g' { gitEnv = gitEnv g })
+ a
{- Runs an action using a different git work tree.
-