diff options
Diffstat (limited to 'Annex/Branch.hs')
-rw-r--r-- | Annex/Branch.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 658ad731f..5a9522689 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -29,6 +29,7 @@ module Annex.Branch ( import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Set as S import qualified Data.Map as M +import qualified Data.AssocList as A import qualified Control.Exception as E import Common.Annex @@ -342,10 +343,12 @@ withIndex' bootstrapping a = do let keyenv = words "USER PATH GIT_EXEC_PATH HOSTNAME HOME" let getEnvPair k = maybe Nothing (\v -> Just (k, v)) <$> getEnv k e <- liftIO $ catMaybes <$> forM keyenv getEnvPair + let e' = ("GIT_INDEX_FILE", f):e #else e <- liftIO getEnvironment + let e' = A.addEntry "GIT_INDEX_FILE" f e #endif - let g' = g { gitEnv = Just $ ("GIT_INDEX_FILE", f):e } + let g' = g { gitEnv = Just e' } r <- tryAnnex $ do Annex.changeState $ \s -> s { Annex.repo = g' } |