From de8f6959d3cd4af348e7a72c45e6e1d6d3cd4cfa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 1 Jun 2017 12:46:36 -0400 Subject: configuration to disable automatic merge conflict resolution * Added annex.resolvemerge configuration, which can be set to false to disable the usual automatic merge conflict resolution done by git-annex sync and the assistant. * sync: Added --no-resolvemerge option. Note that disabling merge conflict resolution is probably not a good idea in a direct mode repo or adjusted branch. Since updates to both are done outside the usual work tree, if it fails the tree is not left in a conflicted state, and it would be hard to manually resolve the conflict. Still, made annex.resolvemerge be supported in those cases for consistency. This commit was sponsored by Riku Voipio. --- Assistant/Sync.hs | 3 ++- Assistant/Threads/Merger.hs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Assistant') diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index 8f30aa4f7..e6a5bc5d5 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -211,7 +211,8 @@ manualPull currentbranch remotes = do else return Nothing haddiverged <- liftAnnex Annex.Branch.forceUpdate forM_ normalremotes $ \r -> - liftAnnex $ Command.Sync.mergeRemote r currentbranch Command.Sync.mergeConfig + liftAnnex $ Command.Sync.mergeRemote r + currentbranch Command.Sync.mergeConfig def return (catMaybes failed, haddiverged) where wantpull gc = remoteAnnexPull gc diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 0bb37e664..05341db1e 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -78,6 +78,7 @@ onChange file ] void $ liftAnnex $ Command.Sync.merge currbranch Command.Sync.mergeConfig + def Git.Branch.AutomaticCommit changedbranch mergecurrent _ = noop -- cgit v1.2.3