Merge branch 'ap/merge-stop-at-prepare-commit-msg-failure'
"git merge" started calling prepare-commit-msg hook like "git commit" does some time ago, but forgot to pay attention to the exit status of the hook. t7505 may want a general clean-up but that is a different topic. * ap/merge-stop-at-prepare-commit-msg-failure: merge: Honor prepare-commit-msg return code
This commit is contained in:
@ -167,5 +167,19 @@ test_expect_success 'with failing hook (--no-verify)' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'with failing hook (merge)' '
|
||||
|
||||
git checkout -B other HEAD@{1} &&
|
||||
echo "more" >> file &&
|
||||
git add file &&
|
||||
rm -f "$HOOK" &&
|
||||
git commit -m other &&
|
||||
write_script "$HOOK" <<-EOF
|
||||
exit 1
|
||||
EOF
|
||||
git checkout - &&
|
||||
test_must_fail git merge other
|
||||
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user