git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Rappo <pavel.rappo@gmail.com>
To: Jeff King <peff@peff.net>
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: Fri, 30 Aug 2024 00:12:07 +0100	[thread overview]
Message-ID: <CAChcVukzk=-1JNAoffWQEEv4Ne1FozGEwzGuaUWuiwhoHkcUng@mail.gmail.com> (raw)
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:
>
> 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

  reply	other threads:[~2024-08-29 23:12 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 [this message]
2024-08-30  0:31       ` Jeff King
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='CAChcVukzk=-1JNAoffWQEEv4Ne1FozGEwzGuaUWuiwhoHkcUng@mail.gmail.com' \
    --to=pavel.rappo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    --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.
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).