Re: How to turn off rename detection for cherry-pick?
- From
Jeff King <peff@peff.net>
- Date
- Aug 30, 2024, 00:31 UTC
- Message-ID
- <20240830003147.GA450797@coredump.intra.peff.net>
- 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