list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: Jerry Zhang <>
Subject: Re: [PATCH] git-apply: try threeway first when "--3way" is used
Date: Tue, 06 Apr 2021 17:19:13 -0700	[thread overview]
Message-ID: <xmqqczv70wvy.fsf@gitster.g> (raw)
In-Reply-To: <> (Jerry Zhang's message of "Tue, 6 Apr 2021 16:25:32 -0700")

Jerry Zhang <> writes:

> Subject: Re: [PATCH] git-apply: try threeway first when "--3way" is used

Just for future reference, it is customery to start with [PATCH v2],
[PATCH v3], etc. when sending an updated patch to make sure it is
obvious to readers of the list which one is the latest.

> The apply_fragments() method of "git apply" can silently apply
> patches incorrectly if a file has repeating contents. In these
> cases a three-way merge is capable of applying it correctly in
> more situations, and will show a conflict rather than applying it
> incorrectly. However, because the patches apply "successfully"
> using apply_fragments(), git will never fall back to the merge,
> even if the "--3way" flag is used, and the user has no way to
> ensure correctness by forcing the three-way merge method.

I think this version addresses all issues I noticed in the previous
version.  Unless somebody else finds some more issues in a coming
few days, let's declare victory and merge it down to 'next'.

By the way, as my last response bounced for the address you had on the CC list, I'm excluding it
from the Cc list of this message.


      reply	other threads:[~2021-04-07  0:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  2:55 Jerry Zhang
2021-04-06  6:13 ` Junio C Hamano
2021-04-06 23:13   ` Junio C Hamano
2021-04-06  6:14 ` Junio C Hamano
2021-04-06 23:25 ` Jerry Zhang
2021-04-07  0:19   ` Junio C Hamano [this message]

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqczv70wvy.fsf@gitster.g \ \ \ \ \ \ \
    --subject='Re: [PATCH] git-apply: try threeway first when "--3way" is used' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

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 read-only IMAP folder(s) and NNTP newsgroup(s).