From e91037a38b7d2fac3b8fcc626511556fc9c6c63d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 May 2016 13:30:59 -0400 Subject: [PATCH] use indexEnv --- Annex/CatFile.hs | 3 ++- Annex/GitOverlay.hs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs index 254dafddb2..8d6237bfe3 100644 --- a/Annex/CatFile.hs +++ b/Annex/CatFile.hs @@ -30,6 +30,7 @@ import qualified Git.CatFile import qualified Annex import Git.Types import Git.FilePath +import Git.Index import qualified Git.Ref import Annex.Link @@ -68,7 +69,7 @@ catObjectDetails ref = do catFileHandle :: Annex Git.CatFile.CatFileHandle catFileHandle = do m <- Annex.getState Annex.catfilehandles - indexfile <- fromMaybe "" . maybe Nothing (lookup "GIT_INDEX_FILE") + indexfile <- fromMaybe "" . maybe Nothing (lookup indexEnv) <$> fromRepo gitEnv case M.lookup indexfile m of Just h -> return h diff --git a/Annex/GitOverlay.hs b/Annex/GitOverlay.hs index 8cc1e04d1f..4796898b95 100644 --- a/Annex/GitOverlay.hs +++ b/Annex/GitOverlay.hs @@ -12,6 +12,7 @@ import qualified Control.Exception as E import Annex.Common import Git import Git.Types +import Git.Index import Git.Env import qualified Annex @@ -21,7 +22,7 @@ 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 -> addGitEnv g indexEnv absf) (\g g' -> g' { gitEnv = gitEnv g }) a