diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-09 08:26:33 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-09 08:26:33 -0800 |
commit | ea12a7d6960c90dc0465a944b9e4426c8a972006 (patch) | |
tree | 327516f255b083403e29a1ee7eeebacb531475bd /t | |
parent | a70472f4d65ef4c8ee89d3d5b8671ebdd22d2014 (diff) | |
parent | 3e4141d08c8dc1964d53c2ce13de8876d29e6436 (diff) | |
download | git-ea12a7d6960c90dc0465a944b9e4426c8a972006.tar.gz |
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
Diffstat (limited to 't')
-rwxr-xr-x | t/t7505-prepare-commit-msg-hook.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 5b4b694f18..357375151d 100755 --- a/t/t7505-prepare-commit-msg-hook.sh +++ b/t/t7505-prepare-commit-msg-hook.sh @@ -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 |