unify handling of unusual GIT_INDEX_FILE relative path
This is probably a git bug that stuck in its interface.
This commit is contained in:
parent
e81b1bc9e7
commit
766728c8cf
4 changed files with 17 additions and 10 deletions
|
@ -19,10 +19,9 @@ import qualified Annex
|
|||
{- Runs an action using a different git index file. -}
|
||||
withIndexFile :: FilePath -> Annex a -> Annex a
|
||||
withIndexFile f a = do
|
||||
-- Workaround http://thread.gmane.org/gmane.comp.version-control.git/294880
|
||||
absf <- liftIO $ absPath f
|
||||
f' <- inRepo $ indexEnvVal f
|
||||
withAltRepo
|
||||
(\g -> addGitEnv g indexEnv absf)
|
||||
(\g -> addGitEnv g indexEnv f')
|
||||
(\g g' -> g' { gitEnv = gitEnv g })
|
||||
a
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue