Merge branch 'en/ort-inner-merge-error-fix'
The "ort" merge backend saw one bugfix for a crash that happens when inner merge gets killed, and assorted code clean-ups. * en/ort-inner-merge-error-fix: merge-ort: fix missing early return merge-ort: convert more error() cases to path_msg() merge-ort: upon merge abort, only show messages causing the abort merge-ort: loosen commented requirements merge-ort: clearer propagation of failure-to-function from merge_submodule merge-ort: fix type of local 'clean' var in handle_content_merge () merge-ort: maintain expected invariant for priv member merge-ort: extract handling of priv member into reusable function
This commit is contained in:
@ -185,7 +185,7 @@ test_expect_success !WINDOWS 'custom merge driver that is killed with a signal'
|
||||
|
||||
>./please-abort &&
|
||||
echo "* merge=custom" >.gitattributes &&
|
||||
test_must_fail git merge main 2>err &&
|
||||
test_expect_code 2 git merge main 2>err &&
|
||||
grep "^error: failed to execute internal merge" err &&
|
||||
git ls-files -u >output &&
|
||||
git diff --name-only HEAD >>output &&
|
||||
@ -261,4 +261,44 @@ test_expect_success 'binary files with union attribute' '
|
||||
grep -i "warning.*cannot merge.*HEAD vs. bin-main" output
|
||||
'
|
||||
|
||||
test_expect_success !WINDOWS 'custom merge driver that is killed with a signal on recursive merge' '
|
||||
test_when_finished "rm -f output please-abort" &&
|
||||
test_when_finished "git checkout side" &&
|
||||
|
||||
git reset --hard anchor &&
|
||||
|
||||
git checkout -b base-a main^ &&
|
||||
echo base-a >text &&
|
||||
git commit -m base-a text &&
|
||||
|
||||
git checkout -b base-b main^ &&
|
||||
echo base-b >text &&
|
||||
git commit -m base-b text &&
|
||||
|
||||
git checkout -b recursive-a base-a &&
|
||||
test_must_fail git merge base-b &&
|
||||
echo recursive-a >text &&
|
||||
git add text &&
|
||||
git commit -m recursive-a &&
|
||||
|
||||
git checkout -b recursive-b base-b &&
|
||||
test_must_fail git merge base-a &&
|
||||
echo recursive-b >text &&
|
||||
git add text &&
|
||||
git commit -m recursive-b &&
|
||||
|
||||
git config --replace-all \
|
||||
merge.custom.driver "./custom-merge %O %A %B 0 %P %S %X %Y" &&
|
||||
git config --replace-all \
|
||||
merge.custom.name "custom merge driver for testing" &&
|
||||
|
||||
>./please-abort &&
|
||||
echo "* merge=custom" >.gitattributes &&
|
||||
test_expect_code 2 git merge recursive-a 2>err &&
|
||||
grep "error: failed to execute internal merge" err &&
|
||||
git ls-files -u >output &&
|
||||
git diff --name-only HEAD >>output &&
|
||||
test_must_be_empty output
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user