From: Jeff King <peff@peff.net>
To: Pavel Rappo <pavel.rappo@gmail.com>
Cc: Elijah Newren <newren@gmail.com>, Git mailing list <git@vger.kernel.org>
Subject: Re: How to turn off rename detection for cherry-pick?
Date: Thu, 29 Aug 2024 20:31:47 -0400 [thread overview]
Message-ID: <20240830003147.GA450797@coredump.intra.peff.net> (raw)
In-Reply-To: <CAChcVukzk=-1JNAoffWQEEv4Ne1FozGEwzGuaUWuiwhoHkcUng@mail.gmail.com>
On Fri, Aug 30, 2024 at 12:12:07AM +0100, Pavel Rappo wrote:
> You seem to have confirmed my understanding that I described in my
> initial email (you replied to my second email in this thread).
Heh, I did not even see the first message in the thread. But since we
independently arrived at the same conclusions, I guess we can consider
everything there accurate. :)
I do think it's a bug that ort doesn't respect -Xno-renames. The fix is
probably something like this:
diff --git a/merge-ort.c b/merge-ort.c
index 3752c7e595..94b3ce734c 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -3338,7 +3338,7 @@ static int detect_regular_renames(struct merge_options *opt,
repo_diff_setup(opt->repo, &diff_opts);
diff_opts.flags.recursive = 1;
diff_opts.flags.rename_empty = 0;
- diff_opts.detect_rename = DIFF_DETECT_RENAME;
+ diff_opts.detect_rename = opts->detect_rename;
diff_opts.rename_limit = opt->rename_limit;
if (opt->rename_limit <= 0)
diff_opts.rename_limit = 7000;
though I'm not sure how DIFF_DETECT_COPIES should be handled
("recursive" silently downgrades it to DIFF_DETECT_RENAME).
I've added ort's author to the thread, so hopefully he should have a
more clueful response.
-Peff
next prev parent reply other threads:[~2024-08-30 0:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 11:09 How to turn off rename detection for cherry-pick? Pavel Rappo
2024-08-29 8:47 ` Pavel Rappo
2024-08-29 21:43 ` Jeff King
2024-08-29 23:12 ` Pavel Rappo
2024-08-30 0:31 ` Jeff King [this message]
2024-08-30 10:35 ` Pavel Rappo
2024-08-30 14:33 ` Elijah Newren
2024-08-30 16:49 ` Junio C Hamano
2024-08-30 16:14 ` Junio C Hamano
2024-08-30 17:17 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240830003147.GA450797@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=pavel.rappo@gmail.com \
/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.
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 NNTP newsgroup(s).