summaryrefslogtreecommitdiff
path: root/ll-merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-17 14:38:32 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-17 14:38:32 -0700
commit243a7f05571f62e3635c90000c07693c1b78b977 (patch)
treeb54b296c80d75f13a00bb66e28f270481d6b0b06 /ll-merge.c
parent5f232ecfdf2982adf67af5f9b7aaf05da13a155c (diff)
parent0f9fd5c91739f62bc0c2291fe6dd6d7e1d1fa901 (diff)
downloadgit-243a7f05571f62e3635c90000c07693c1b78b977.tar.gz
Merge branch 'jc/ll-merge-internal'
"git rerere" can get confused by conflict markers deliberately left by the inner merge step, because they are indistinguishable from the real conflict markers left by the outermost merge which are what the end user and "rerere" need to look at. This was fixed by making the conflict markers left by the inner merges a bit longer. * jc/ll-merge-internal: t6036: remove pointless test that expects failure ll-merge: use a longer conflict marker for internal merge ll-merge: fix typo in comment
Diffstat (limited to 'll-merge.c')
-rw-r--r--ll-merge.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ll-merge.c b/ll-merge.c
index ff4a43a982..ad8be42f91 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -47,7 +47,9 @@ static int ll_binary_merge(const struct ll_merge_driver *drv_unused,
assert(opts);
/*
- * The tentative merge result is the or common ancestor for an internal merge.
+ * The tentative merge result is the common ancestor for an
+ * internal merge. For the final merge, it is "ours" by
+ * default but -Xours/-Xtheirs can tweak the choice.
*/
if (opts->virtual_ancestor) {
stolen = orig;
@@ -383,8 +385,12 @@ int ll_merge(mmbuffer_t *result_buf,
}
}
driver = find_ll_merge_driver(ll_driver_name);
- if (opts->virtual_ancestor && driver->recursive)
- driver = find_ll_merge_driver(driver->recursive);
+
+ if (opts->virtual_ancestor) {
+ if (driver->recursive)
+ driver = find_ll_merge_driver(driver->recursive);
+ marker_size += 2;
+ }
return driver->fn(driver, result_buf, path, ancestor, ancestor_label,
ours, our_label, theirs, their_label,
opts, marker_size);