diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-06-01 12:46:36 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-06-01 12:51:01 -0400 |
commit | de8f6959d3cd4af348e7a72c45e6e1d6d3cd4cfa (patch) | |
tree | f63493430204d764d84a44a909f68b778b719716 /Annex/AdjustedBranch.hs | |
parent | 5c058d99a26da3639afcbf855eb7b6ca3d628fb3 (diff) |
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.
Diffstat (limited to 'Annex/AdjustedBranch.hs')
-rw-r--r-- | Annex/AdjustedBranch.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/AdjustedBranch.hs b/Annex/AdjustedBranch.hs index c0225540a..52f73e638 100644 --- a/Annex/AdjustedBranch.hs +++ b/Annex/AdjustedBranch.hs @@ -318,8 +318,8 @@ findAdjustingCommit (AdjBranch b) = go =<< catCommit b {- Update the currently checked out adjusted branch, merging the provided - branch into it. Note that the provided branch should be a non-adjusted - branch. -} -updateAdjustedBranch :: Branch -> (OrigBranch, Adjustment) -> [Git.Merge.MergeConfig] -> Git.Branch.CommitMode -> Annex Bool -updateAdjustedBranch tomerge (origbranch, adj) mergeconfig commitmode = catchBoolIO $ +updateAdjustedBranch :: Branch -> (OrigBranch, Adjustment) -> [Git.Merge.MergeConfig] -> Annex Bool -> Git.Branch.CommitMode -> Annex Bool +updateAdjustedBranch tomerge (origbranch, adj) mergeconfig canresolvemerge commitmode = catchBoolIO $ join $ preventCommits go where adjbranch@(AdjBranch currbranch) = originalToAdjusted origbranch adj @@ -417,7 +417,7 @@ updateAdjustedBranch tomerge (origbranch, adj) mergeconfig commitmode = catchBoo -- this commit will be a fast-forward. adjmergecommitff <- commitAdjustedTree' adjtree (BasisBranch mergecommit) [currbranch] showAction "Merging into adjusted branch" - ifM (autoMergeFrom adjmergecommitff (Just currbranch) mergeconfig commitmode) + ifM (autoMergeFrom adjmergecommitff (Just currbranch) mergeconfig canresolvemerge commitmode) ( reparent adjtree adjmergecommit =<< getcurrentcommit , return False ) |