Work around git bug in handling of relative path to GIT_INDEX_FILE when in a subdirectory of the repository.
This affected git annex view. It turns out that some other places that use GIT_INDEX_FILE were already working around the bug. I removed the workaround from Annex.Branch since the new workaround will do.
This commit is contained in:
parent
27000d8af6
commit
93c03b5dd5
4 changed files with 13 additions and 5 deletions
|
@ -17,9 +17,13 @@ import qualified Annex
|
|||
|
||||
{- Runs an action using a different git index file. -}
|
||||
withIndexFile :: FilePath -> Annex a -> Annex a
|
||||
withIndexFile f = withAltRepo
|
||||
(\g -> addGitEnv g "GIT_INDEX_FILE" f)
|
||||
(\g g' -> g' { gitEnv = gitEnv g })
|
||||
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 g' -> g' { gitEnv = gitEnv g })
|
||||
a
|
||||
|
||||
{- Runs an action using a different git work tree.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue