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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 7, 2021, 00:19 UTC
Message-ID
<xmqqczv70wvy.fsf@gitster.g>
In-Reply-To
<20210406232532.3543-1-jerry@skydio.com>
Jerry Zhang <jerry@skydio.com> 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.

Show 8 quoted lines
> 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 brian.kubisiak@skydio.com you had on the CC list, I'm excluding it from the Cc list of this message.

Thanks.
Previous: Jerry Zhang
Message 6 of 6 in “git-apply: try threeway first when "--3way" is used”
  1. git-apply: try threeway first when "--3way" is usedJerry Zhang, Apr 6, 2021
  2. Junio C HamanoApr 6, 2021
  3. Junio C HamanoApr 6, 2021
  4. Junio C HamanoApr 6, 2021
  5. git-apply: try threeway first when "--3way" is usedJerry Zhang, Apr 6, 2021
  6. Junio C HamanoApr 7, 2021

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.