use indexEnv
This commit is contained in:
parent
93c03b5dd5
commit
e91037a38b
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue