]> git.ipfire.org Git - thirdparty/git.git/commit
t: prepare `test_match_signal ()` calls for `set -e`
authorPatrick Steinhardt <ps@pks.im>
Tue, 21 Apr 2026 07:34:14 +0000 (09:34 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Apr 2026 22:53:35 +0000 (15:53 -0700)
commit0cb6316b08463d9ec491e6db5ce53c3a65c048a8
treecab3609874cfb8ee7c8457101244d8889e3a2139
parent8c9303b1ffae5b745d1b0a1f98330cf7944d8db0
t: prepare `test_match_signal ()` calls for `set -e`

We have a couple of calls to `test_match_signal ()` where we execute a
Git command and expect it to die with a specific signal. These calls
will essentially execute the process in a subshell via `foo; echo $?`,
but as we expect `foo` to fail this will cause the overall subshell to
fail once we `set -e`.

Fix this issue by using `foo && echo 0 || echo $?` instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0005-signals.sh
t/t3600-rm.sh