git/Documentation
Jerry Zhang 923cd87ac8 git-apply: try threeway first when "--3way" is used
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.

Change the behavior so that when "--3way" is used,
git will always try the three-way merge first and
will only fall back to apply_fragments() in cases
where blobs are not available or some other error
(but not in the case of a merge conflict).

Since user-facing results will be different,
this has backwards compatibility implications
for users depending on the old behavior. In
addition, the three-way merge will be slower
than direct patch application.

Signed-off-by: Jerry Zhang <jerry@skydio.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-04-06 17:11:41 -07:00
..
2020-07-06 22:09:16 -07:00
2021-04-02 14:43:31 -07:00
2021-04-02 14:43:14 -07:00
2019-05-09 00:37:27 +09:00
2020-08-04 18:34:02 -07:00
2020-09-19 15:56:06 -07:00
2021-02-05 16:40:44 -08:00
2021-01-04 11:27:48 -08:00
2020-04-29 16:15:27 -07:00
2019-01-23 11:37:29 -08:00
2021-02-18 10:53:33 -08:00
2019-05-07 13:04:48 +09:00
2019-05-07 13:04:48 +09:00
2019-10-21 12:02:39 +09:00