summaryrefslogtreecommitdiff
path: root/Annex/GitOverlay.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-04-06 17:32:04 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-04-06 17:32:04 -0400
commit070b1a03392ab3962eb43f60f32fde5c1b9b70d2 (patch)
treeb6097608e2e12c026ca05164fc81148ede79cc23 /Annex/GitOverlay.hs
parent2caa1330b3abb4bb2ac60eb8b144046d03a1287b (diff)
fix auto merge conflict resolution when doing out of tree merge for adjusted branch
Diffstat (limited to 'Annex/GitOverlay.hs')
-rw-r--r--Annex/GitOverlay.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Annex/GitOverlay.hs b/Annex/GitOverlay.hs
index b6b1398f4..4230ed4a4 100644
--- a/Annex/GitOverlay.hs
+++ b/Annex/GitOverlay.hs
@@ -21,14 +21,20 @@ withIndexFile f = withAltRepo
(\g -> addGitEnv g "GIT_INDEX_FILE" f)
(\g g' -> g' { gitEnv = gitEnv g })
-{- Runs an action using a different git work tree. -}
+{- Runs an action using a different git work tree.
+ -
+ - Smudge and clean filters are disabled in this work tree. -}
withWorkTree :: FilePath -> Annex a -> Annex a
withWorkTree d = withAltRepo
- (\g -> return $ g { location = modlocation (location g) })
- (\g g' -> g' { location = location g })
+ (\g -> return $ g { location = modlocation (location g), gitGlobalOpts = gitGlobalOpts g ++ disableSmudgeConfig })
+ (\g g' -> g' { location = location g, gitGlobalOpts = gitGlobalOpts g })
where
modlocation l@(Local {}) = l { worktree = Just d }
modlocation _ = error "withWorkTree of non-local git repo"
+ disableSmudgeConfig = map Param
+ [ "-c", "filter.annex.smudge="
+ , "-c", "filter.annex.clean="
+ ]
{- Runs an action with the git index file and HEAD, and a few other
- files that are related to the work tree coming from an overlay