]> git.ipfire.org Git - thirdparty/git.git/commitdiff
merge-ort: drop unused parameters from detect_and_process_renames()
authorJeff King <peff@peff.net>
Thu, 14 Sep 2023 09:39:58 +0000 (05:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Sep 2023 19:01:29 +0000 (12:01 -0700)
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
f78cf97617 (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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c

index 31c663b297a709cdf77dfd3dd22c9c112f416ed6..20eefd9b5ed20b37a5d4d8e2ec59ad4ba22bc6e7 100644 (file)
@@ -3324,10 +3324,7 @@ static int collect_renames(struct merge_options *opt,
        return clean;
 }
 
-static int detect_and_process_renames(struct merge_options *opt,
-                                     struct tree *merge_base,
-                                     struct tree *side1,
-                                     struct tree *side2)
+static int detect_and_process_renames(struct merge_options *opt)
 {
        struct diff_queue_struct combined = { 0 };
        struct rename_info *renames = &opt->priv->renames;
@@ -4964,8 +4961,7 @@ redo:
        trace2_region_leave("merge", "collect_merge_info", opt->repo);
 
        trace2_region_enter("merge", "renames", opt->repo);
-       result->clean = detect_and_process_renames(opt, merge_base,
-                                                  side1, side2);
+       result->clean = detect_and_process_renames(opt);
        trace2_region_leave("merge", "renames", opt->repo);
        if (opt->priv->renames.redo_after_renames == 2) {
                trace2_region_enter("merge", "reset_maps", opt->repo);