Skip to content

Commit f7ca9bb

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2e806d8 commit f7ca9bb

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

sequencer.c

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -781,28 +781,19 @@ static int do_recursive_merge(struct repository *r,
781781
for (i = 0; i < opts->xopts.nr; i++)
782782
parse_merge_opt(&o, opts->xopts.v[i]);
783783

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;
806797
if (clean < 0) {
807798
rollback_lock_file(&index_lock);
808799
return clean;

0 commit comments

Comments
 (0)