git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Pavel RappoNext: Pavel Rappo
Message 5 of 10 in “How to turn off rename detection for cherry-pick?”
  1. Pavel RappoAug 26, 2024
  2. Pavel RappoAug 29, 2024
  3. Jeff KingAug 29, 2024
  4. Pavel RappoAug 29, 2024
  5. Jeff KingAug 30, 2024
  6. Pavel RappoAug 30, 2024
  7. Elijah NewrenAug 30, 2024
  8. Junio C HamanoAug 30, 2024
  9. Junio C HamanoAug 30, 2024
  10. Junio C HamanoAug 30, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.