Skip to content

Commit fce9ffb

Browse files
peffgitster
authored andcommitted
merge-ort: drop unused parameters from detect_and_process_renames()
This function takes three trees representing the merge base and both sides of the merge, but never looks at any of them. This is due to f78cf97 (merge-ort: call diffcore_rename() directly, 2021-02-14). Prior to that commit, we passed pairs of trees to diff_tree_oid(). But after that commit, we collect a custom diff_queue for each pair in the merge_options struct, and just run diffcore_rename() on the result. So the function does not need to know about the original trees at all anymore. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1c9419a commit fce9ffb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

merge-ort.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,10 +3324,7 @@ static int collect_renames(struct merge_options *opt,
33243324
return clean;
33253325
}
33263326

3327-
static int detect_and_process_renames(struct merge_options *opt,
3328-
struct tree *merge_base,
3329-
struct tree *side1,
3330-
struct tree *side2)
3327+
static int detect_and_process_renames(struct merge_options *opt)
33313328
{
33323329
struct diff_queue_struct combined = { 0 };
33333330
struct rename_info *renames = &opt->priv->renames;
@@ -4964,8 +4961,7 @@ static void merge_ort_nonrecursive_internal(struct merge_options *opt,
49644961
trace2_region_leave("merge", "collect_merge_info", opt->repo);
49654962

49664963
trace2_region_enter("merge", "renames", opt->repo);
4967-
result->clean = detect_and_process_renames(opt, merge_base,
4968-
side1, side2);
4964+
result->clean = detect_and_process_renames(opt);
49694965
trace2_region_leave("merge", "renames", opt->repo);
49704966
if (opt->priv->renames.redo_after_renames == 2) {
49714967
trace2_region_enter("merge", "reset_maps", opt->repo);

0 commit comments

Comments
 (0)