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

Re: How to turn off rename detection for cherry-pick?

From
PRPavel Rappo <pavel.rappo@gmail.com>
Date
Aug 29, 2024, 23:12 UTC
Message-ID
<CAChcVukzk=-1JNAoffWQEEv4Ne1FozGEwzGuaUWuiwhoHkcUng@mail.gmail.com>
In-Reply-To
<20240829214336.GA440013@coredump.intra.peff.net>

You seem to have confirmed my understanding that I described in my initial email (you replied to my second email in this thread).

On Thu, Aug 29, 2024 at 10:43 PM Jeff King <peff@peff.net> wrote:
Show 25 quoted lines
>
> On Thu, Aug 29, 2024 at 09:47:52AM +0100, Pavel Rappo wrote:
>
> > The reason I ask this is that we've run into a (probably practically
> > rare) case where cherry-pick changes a wrong file. We want to be able
> > to detect such cases.
>
> You can pass merge strategy options on the command line. The old
> "recursive" strategy has a "no-renames" option, so:
>
>   git cherry-pick --strategy=recursive -Xno-renames feature
>
> generates a modify/delete conflict for your example. Curiously, the
> modern default, "ort", does not seem to respect that option. You can
> bump up the limit to require exact renames, though, which does prevent
> the mismerge in your case. Like:
>
>   git cherry-pick -Xfind-renames=100% feature
>
> There are also other strategies that do not do rename detection, but I
> think you are better off using one of the more commonly-used strategies
> and just disabling renames. IMHO it's a bug that ort doesn't respect
> -Xno-renames.
>
> -Peff
Previous: Jeff KingNext: Jeff King
Message 4 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.