]> git.ipfire.org Git - thirdparty/git.git/commit
t0008: silence error in subshell when using `grep -v`
authorPatrick Steinhardt <ps@pks.im>
Tue, 21 Apr 2026 07:34:21 +0000 (09:34 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Apr 2026 22:53:36 +0000 (15:53 -0700)
commitb94900a0cf20e213038102a4cbf072dec5b1bb18
tree2ec2125fcd8a2fe52fd18bb9d81f50b847595a84
parentc1e29bcfa88fb8997379c3c7c888961b728e581d
t0008: silence error in subshell when using `grep -v`

In t0008 we use `grep -v` in a subshell, but expect that this command
will sometimes not match anything. This would cause grep(1) to return an
error code, but given that we don't run with `set -e` we swallow this
error.

We're about to enable `set -e`. Prepare for this by ignoring any errors.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0008-ignores.sh