aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-07-28 01:13:31 +0200
committerJunio C Hamano <gitster@pobox.com>2022-07-27 16:35:39 -0700
commit25c2351d85bf19cfd0b19e2de8468c3604897dcf (patch)
tree9fbee610be6830109bfb88af418e8bc30027e9da /builtin/commit.c
parenttest-lib: don't set GIT_EXIT_OK before calling test_atexit_handler (diff)
downloadgit-25c2351d85bf19cfd0b19e2de8468c3604897dcf.tar.gz
git-25c2351d85bf19cfd0b19e2de8468c3604897dcf.zip
test-lib: fix GIT_EXIT_OK logic errors, use BAIL_OUT
Change various "exit 1" checks that happened after our "die" handler had been set up to use BAIL_OUT instead. See 234383cd401 (test-lib.sh: use "Bail out!" syntax on bad SANITIZE=leak use, 2021-10-14) for the benefits of the BAIL_OUT function. The previous use of "error" here was not a logic error, but the "exit" without "GIT_EXIT_OK" would emit the "FATAL: Unexpected exit with code $code" message on top of the error we wanted to emit. Since we'd also like to stop "prove" in its tracks here, the right thing to do is to emit a "Bail out!" message. Let's also move the "GIT_EXIT_OK=t" assignments to just above the "exit [01]" in "test_done". It's not OK if we exit in e.g. finalize_test_output. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions