diff options
author | 2022-01-10 11:52:53 -0800 | |
---|---|---|
committer | 2022-01-10 11:52:53 -0800 | |
commit | bc61dbac770923a96e2007c3de4027c5d11c6d41 (patch) | |
tree | c6f487d5fbdf0bb91185002a2d5e6744ac8f5b16 /t | |
parent | Merge branch 'hn/reftable-fixes' (diff) | |
parent | git-apply: skip threeway in add / rename cases (diff) | |
download | tgif-bc61dbac770923a96e2007c3de4027c5d11c6d41.tar.xz |
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 't')
-rwxr-xr-x | t/t4108-apply-threeway.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh index cc3aa3314a..c558282bc0 100755 --- a/t/t4108-apply-threeway.sh +++ b/t/t4108-apply-threeway.sh @@ -275,4 +275,22 @@ test_expect_success 'apply full-index patch with 3way' ' git apply --3way --index bin.diff ' +test_expect_success 'apply delete then new patch with 3way' ' + git reset --hard main && + test_write_lines 2 > delnew && + git add delnew && + git diff --cached >> new.patch && + git reset --hard && + test_write_lines 1 > delnew && + git add delnew && + git commit -m "delnew" && + rm delnew && + git diff >> delete-then-new.patch && + cat new.patch >> delete-then-new.patch && + + git checkout -- . && + # Apply must succeed. + git apply --3way delete-then-new.patch +' + test_done |