From: Elijah Newren <newren@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/4] merge-ort: drop unused parameters from detect_and_process_renames()
Date: Fri, 15 Sep 2023 20:04:00 -0700 [thread overview]
Message-ID: <CABPp-BFpCGCW1SiiTjje=_STEg68=DesA11pS5cEkCxa+C0Ttw@mail.gmail.com> (raw)
In-Reply-To: <20230914093958.GC2254894@coredump.intra.peff.net>
On Thu, Sep 14, 2023 at 2:39 AM Jeff King <peff@peff.net> wrote:
>
> 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.
Thanks for including the history.
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> merge-ort.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/merge-ort.c b/merge-ort.c
> index 31c663b297..20eefd9b5e 100644
> --- a/merge-ort.c
> +++ b/merge-ort.c
> @@ -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 @@ static void merge_ort_nonrecursive_internal(struct merge_options *opt,
> 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);
> --
> 2.42.0.628.g8a27295885
Looks good.
next prev parent reply other threads:[~2023-09-16 3:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 9:34 [PATCH 0/4] merge-ort unused parameter cleanups Jeff King
2023-09-14 9:39 ` [PATCH 1/4] merge-ort: drop custom err() function Jeff King
2023-09-16 2:54 ` Elijah Newren
2023-09-16 5:50 ` Jeff King
2023-09-14 9:39 ` [PATCH 2/4] merge-ort: stop passing "opt" to read_oid_strbuf() Jeff King
2023-09-14 9:39 ` [PATCH 3/4] merge-ort: drop unused parameters from detect_and_process_renames() Jeff King
2023-09-16 3:04 ` Elijah Newren [this message]
2023-09-14 9:40 ` [PATCH 4/4] merge-ort: drop unused "opt" parameter from merge_check_renames_reusable() Jeff King
2023-09-16 3:09 ` Elijah Newren
2023-09-16 5:52 ` Jeff King
2023-09-16 2:56 ` [PATCH 0/4] merge-ort unused parameter cleanups Elijah Newren
2023-09-16 6:00 ` [PATCH 5/4] merge-ort: lowercase a few error messages Jeff King
2023-09-16 7:29 ` Jeff King
2023-09-16 21:49 ` Junio C Hamano
2023-09-16 22:11 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABPp-BFpCGCW1SiiTjje=_STEg68=DesA11pS5cEkCxa+C0Ttw@mail.gmail.com' \
--to=newren@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).