sequencer: switch non-recursive merges over to ort
The do_recursive_merge() function, which is somewhat misleadingly named since its purpose in life is to do a *non*-recursive merge, had code to allow either using the recursive or ort backends. The default has been ort for a very long time, let's just remove the code path for allowing the recursive backend to be selected. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Apr 8, 2025 at 15:48 UTC
f7ca9bbea6de24ff375bfba38c536b0a89474900
1 file changed
+13
-22
sequencer.c
+13
-22
@@ -781,28 +781,19 @@ static int do_recursive_merge(struct repository *r,
781
for (i = 0; i < opts->xopts.nr; i++)
782
parse_merge_opt(&o, opts->xopts.v[i]);
783
784
- if (!opts->strategy || !strcmp(opts->strategy, "ort")) {
785
- memset(&result, 0, sizeof(result));
786
- merge_incore_nonrecursive(&o, base_tree, head_tree, next_tree,
787
- &result);
788
- show_output = !is_rebase_i(opts) || !result.clean;
789
- /*
790
- * TODO: merge_switch_to_result will update index/working tree;
791
- * we only really want to do that if !result.clean || this is
792
- * the final patch to be picked. But determining this is the
793
- * final patch would take some work, and "head_tree" would need
794
- * to be replace with the tree the index matched before we
795
- * started doing any picks.
796
- */
797
- merge_switch_to_result(&o, head_tree, &result, 1, show_output);
798
- clean = result.clean;
799
- } else {
800
- ensure_full_index(r->index);
801
- clean = merge_trees(&o, head_tree, next_tree, base_tree);
802
- if (is_rebase_i(opts) && clean <= 0)
803
- fputs(o.obuf.buf, stdout);
804
- strbuf_release(&o.obuf);
805
- }
784
+ memset(&result, 0, sizeof(result));
785
+ merge_incore_nonrecursive(&o, base_tree, head_tree, next_tree, &result);
786
+ show_output = !is_rebase_i(opts) || !result.clean;
787
+ /*
788
+ * TODO: merge_switch_to_result will update index/working tree;
789
+ * we only really want to do that if !result.clean || this is
790
+ * the final patch to be picked. But determining this is the
791
+ * final patch would take some work, and "head_tree" would need
792
+ * to be replace with the tree the index matched before we
793
+ * started doing any picks.
794
+ */
795
+ merge_switch_to_result(&o, head_tree, &result, 1, show_output);
796
+ clean = result.clean;
797
if (clean < 0) {
798
rollback_lock_file(&index_lock);
799
return clean;