Fix a long-standing bug that could cause the wrong index file to be used when committing to the git-annex branch, if GIT_INDEX_FILE is set in the environment. This typically resulted in git-annex branch log files being committed to the master branch and later showing up in the work tree. (These log files can be safely removed.)

This commit is contained in:
Joey Hess 2014-01-14 15:36:33 -04:00
parent 188f0bd58d
commit d07f2d7865
7 changed files with 31 additions and 11 deletions

View file

@ -9,6 +9,7 @@ module Remote.Glacier (remote, jobList) where
import qualified Data.Map as M
import qualified Data.Text as T
import Data.AssocList as A
import System.Environment
import Common.Annex
@ -232,7 +233,7 @@ glacierEnv c u = go =<< getRemoteCredPairFor "glacier" c creds
go Nothing = return Nothing
go (Just (user, pass)) = do
e <- liftIO getEnvironment
return $ Just $ (uk, user):(pk, pass):e
return $ Just $ A.addEntries [(uk, user), (pk, pass)] e
creds = AWS.creds u
(uk, pk) = credPairEnvironment creds