summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2025-04-08 15:48:38 +0000
committerJunio C Hamano <gitster@pobox.com>2025-04-08 13:59:12 -0700
commitf7ca9bbea6de24ff375bfba38c536b0a89474900 (patch)
treef82a60f2e16a815e8dfb5f7e6dac2b364ecdf182 /sequencer.c
parent2e806d8464decacc307cdbfa45c98be8e28382da (diff)
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c35
1 files changed, 13 insertions, 22 deletions
diff --git a/sequencer.c b/sequencer.c
index ad0ab75c8d..b5d91fd351 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -781,28 +781,19 @@ static int do_recursive_merge(struct repository *r,
for (i = 0; i < opts->xopts.nr; i++)
parse_merge_opt(&o, opts->xopts.v[i]);
- if (!opts->strategy || !strcmp(opts->strategy, "ort")) {
- memset(&result, 0, sizeof(result));
- merge_incore_nonrecursive(&o, base_tree, head_tree, next_tree,
- &result);
- show_output = !is_rebase_i(opts) || !result.clean;
- /*
- * TODO: merge_switch_to_result will update index/working tree;
- * we only really want to do that if !result.clean || this is
- * the final patch to be picked. But determining this is the
- * final patch would take some work, and "head_tree" would need
- * to be replace with the tree the index matched before we
- * started doing any picks.
- */
- merge_switch_to_result(&o, head_tree, &result, 1, show_output);
- clean = result.clean;
- } else {
- ensure_full_index(r->index);
- clean = merge_trees(&o, head_tree, next_tree, base_tree);
- if (is_rebase_i(opts) && clean <= 0)
- fputs(o.obuf.buf, stdout);
- strbuf_release(&o.obuf);
- }
+ memset(&result, 0, sizeof(result));
+ merge_incore_nonrecursive(&o, base_tree, head_tree, next_tree, &result);
+ show_output = !is_rebase_i(opts) || !result.clean;
+ /*
+ * TODO: merge_switch_to_result will update index/working tree;
+ * we only really want to do that if !result.clean || this is
+ * the final patch to be picked. But determining this is the
+ * final patch would take some work, and "head_tree" would need
+ * to be replace with the tree the index matched before we
+ * started doing any picks.
+ */
+ merge_switch_to_result(&o, head_tree, &result, 1, show_output);
+ clean = result.clean;
if (clean < 0) {
rollback_lock_file(&index_lock);
return clean;