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

Re: Why `git am -3` apply patches that don't normally apply?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 5, 2022, 18:09 UTC
Message-ID
<xmqqmtdnjut5.fsf@gitster.g>
In-Reply-To
<CABPp-BEkEKQZR=1duxSS4AVv9u5tnPk5CaLCM_fQWPbAqfSMxw@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 6 quoted lines
> As per the documentation of -3:
>
>         When the patch does not apply cleanly, fall back on
>         3-way merge if the patch records the identity of blobs
>         it is supposed to apply to and we have those blobs
>         available locally.

I suspect that we would need to update this part, as the order of "fall back" was swapped sometime in the recent past (and we have fixed a few bugs that were introduced as fallouts).

Your description on how -3 works when it does the three-way based on the concrete example was very clear and easy to understand, by the way.

Thanks for writing it up.
Previous: Elijah NewrenNext: Yuri Kanivetsky
Message 3 of 4 in “Why `git am -3` apply patches that don't normally apply?”
  1. Yuri KanivetskyJul 3, 2022
  2. Elijah NewrenJul 4, 2022
  3. Junio C HamanoJul 5, 2022
  4. Yuri KanivetskyJul 6, 2022

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.