diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-17 13:30:59 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-05-17 13:38:04 -0400 |
commit | ed91fe6a1c32fa52abfae46d35fcb50b9f8c63c8 (patch) | |
tree | 312113439d2d5065ecbf8a4cc09aca0f99477f80 /Annex | |
parent | e2b93987143faba2c1f507da436752ef826c5ff3 (diff) |
use indexEnv
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/CatFile.hs | 3 | ||||
-rw-r--r-- | Annex/GitOverlay.hs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs index 254dafddb..8d6237bfe 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 8cc1e04d1..4796898b9 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 |