Re: Why `git am -3` apply patches that don't normally apply?
- From
Yuri Kanivetsky <yuri.kanivetsky@gmail.com>
- Date
- Jul 6, 2022, 00:19 UTC
- Message-ID
- <CAMhVC3b+ByoxRn1o1WDvb3Rk07j_YQu9bd4w+STAgzNqkxK5ig@mail.gmail.com>
- In-Reply-To
- <xmqqmtdnjut5.fsf@gitster.g>
Yep, thanks for the detailed explanations. It let me improve my answer on Stack Overflow:
https://stackoverflow.com/questions/25846189/git-am-error-patch-does-not-apply/72797965#72797965
Although... it'll unlikely receive a lot of views :( But whatever, it can't be helped.
Regards, Yuri
On Tue, Jul 5, 2022 at 9:09 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> > Elijah Newren <newren@gmail.com> writes: > > > 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.