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 qualified Annex
|
||||||
import Git.Types
|
import Git.Types
|
||||||
import Git.FilePath
|
import Git.FilePath
|
||||||
|
import Git.Index
|
||||||
import qualified Git.Ref
|
import qualified Git.Ref
|
||||||
import Annex.Link
|
import Annex.Link
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ catObjectDetails ref = do
|
||||||
catFileHandle :: Annex Git.CatFile.CatFileHandle
|
catFileHandle :: Annex Git.CatFile.CatFileHandle
|
||||||
catFileHandle = do
|
catFileHandle = do
|
||||||
m <- Annex.getState Annex.catfilehandles
|
m <- Annex.getState Annex.catfilehandles
|
||||||
indexfile <- fromMaybe "" . maybe Nothing (lookup "GIT_INDEX_FILE")
|
indexfile <- fromMaybe "" . maybe Nothing (lookup indexEnv)
|
||||||
<$> fromRepo gitEnv
|
<$> fromRepo gitEnv
|
||||||
case M.lookup indexfile m of
|
case M.lookup indexfile m of
|
||||||
Just h -> return h
|
Just h -> return h
|
||||||
|
|
|
@ -12,6 +12,7 @@ import qualified Control.Exception as E
|
||||||
import Annex.Common
|
import Annex.Common
|
||||||
import Git
|
import Git
|
||||||
import Git.Types
|
import Git.Types
|
||||||
|
import Git.Index
|
||||||
import Git.Env
|
import Git.Env
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ withIndexFile f a = do
|
||||||
-- Workaround http://thread.gmane.org/gmane.comp.version-control.git/294880
|
-- Workaround http://thread.gmane.org/gmane.comp.version-control.git/294880
|
||||||
absf <- liftIO $ absPath f
|
absf <- liftIO $ absPath f
|
||||||
withAltRepo
|
withAltRepo
|
||||||
(\g -> addGitEnv g "GIT_INDEX_FILE" absf)
|
(\g -> addGitEnv g indexEnv absf)
|
||||||
(\g g' -> g' { gitEnv = gitEnv g })
|
(\g g' -> g' { gitEnv = gitEnv g })
|
||||||
a
|
a
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue