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.