diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 19:52:53 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 19:52:53 (GMT) |
commit | bc61dbac770923a96e2007c3de4027c5d11c6d41 (patch) | |
tree | c6f487d5fbdf0bb91185002a2d5e6744ac8f5b16 /apply.c | |
parent | 78e696c9dd709a14933f4f4595f0412ed6a008e9 (diff) | |
parent | 34d607032c0db6a6c68754e7a339c3caf08d6a79 (diff) | |
download | git-bc61dbac770923a96e2007c3de4027c5d11c6d41.zip git-bc61dbac770923a96e2007c3de4027c5d11c6d41.tar.gz git-bc61dbac770923a96e2007c3de4027c5d11c6d41.tar.bz2 |
Merge branch 'jz/apply-3-corner-cases'
"git apply --3way" bypasses the attempt to do a three-way
application in more cases to address the regression caused by the
recent change to use direct application as a fallback.
* jz/apply-3-corner-cases:
git-apply: skip threeway in add / rename cases
Diffstat (limited to 'apply.c')
-rw-r--r-- | apply.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3582,7 +3582,9 @@ static int try_threeway(struct apply_state *state, /* No point falling back to 3-way merge in these cases */ if (patch->is_delete || - S_ISGITLINK(patch->old_mode) || S_ISGITLINK(patch->new_mode)) + S_ISGITLINK(patch->old_mode) || S_ISGITLINK(patch->new_mode) || + (patch->is_new && !patch->direct_to_threeway) || + (patch->is_rename && !patch->lines_added && !patch->lines_deleted)) return -1; /* Preimage the patch was prepared for */ |