summaryrefslogtreecommitdiff
path: root/builtin/merge-recursive.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2025-04-08 15:48:36 +0000
committerJunio C Hamano <gitster@pobox.com>2025-04-08 13:59:11 -0700
commit77c029493a671d9ee200bda42da0a3c04cdf110f (patch)
tree67a6c7e1f89c5da89f901bd5927cde9ae774a8ba /builtin/merge-recursive.c
parentb5dff2bd619d47aa09e757761e5ff72ecb0637b7 (diff)
builtin/merge-recursive: switch to using merge_ort_generic()
Switch from merge-recursive to merge-ort. Adjust the following testcases due to the switch: * t6430: most of the test differences here were due to improved D/F conflict handling explained in more detail in ef527787089c (merge tests: expect improved directory/file conflict handling in ort, 2020-10-26). These changes weren't made to this test back in that commit simply because I had been looking at `git merge` rather than `git merge-recursive`. The final test in this testsuite, though, was expunged because it was looking for specific output, and the calls to output_commit_title() were discarded from merge_ort_internal() in its adaptation from merge_recursive_internal(); see 8119214f4e70 (merge-ort: implement merge_incore_recursive(), 2020-12-16). * t6434: This test is built entirely around rename/delete conflicts, which had a suboptimal handling under merge-recursive. As explained in more detail in commits 1f3c9ba707 ("t6425: be more flexible with rename/delete conflict messages", 2020-08-10) and 727c75b23f ("t6404, t6423: expect improved rename/delete handling in ort backend", 2020-10-26), rename/delete conflicts should each have two entries in the index rather than just one. Adjust the expectations for all the tests in this testcase to see the two entries per rename/delete conflict. * t6424: merge-recursive had a special check-if-toplevel-trees-match check that it ran at the beginning on both the merge-base and the other side being merged in. In such a case, it exited early and printed an "Already up to date." message. merge-ort got rid of this, and instead checks the merge base tree matching the other side throughout the tree instead of just at the toplevel, allowing it to avoid recursing into various subtrees. As part of that, it got rid of the specialty toplevel message. That message hasn't been missed for years from `git merge`, so I don't think it is necessary to keep it just for `git merge-recursive`, especially since the latter is rarely used. (git itself only references it in the testsuite, whereas it used to power one of the three rebase backends that existed once upon a time.) Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-recursive.c')
-rw-r--r--builtin/merge-recursive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index abfc060e28..03b5100cfa 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -3,7 +3,7 @@
#include "advice.h"
#include "gettext.h"
#include "hash.h"
-#include "merge-recursive.h"
+#include "merge-ort-wrappers.h"
#include "object-name.h"
static const char builtin_merge_recursive_usage[] =
@@ -89,7 +89,7 @@ int cmd_merge_recursive(int argc,
if (o.verbosity >= 3)
printf(_("Merging %s with %s\n"), o.branch1, o.branch2);
- failed = merge_recursive_generic(&o, &h1, &h2, bases_count, bases, &result);
+ failed = merge_ort_generic(&o, &h1, &h2, bases_count, bases, &result);
free(better1);
free(better2);