t3920: don't ignore errors of more than one command with `|| true`
commit500317ae03f635b247627eeb9760d9de2e343875
authorJohannes Sixt <j6t@kdbg.org>
Mon, 21 Nov 2022 17:58:13 +0000 (21 18:58 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Dec 2022 01:02:34 +0000 (5 10:02 +0900)
tree20e0aeaa6d9cb9577f6b916d31a6834e881010e5
parente7e5c6f715b2de7bea0d39c7d2ba887335b40aa0
t3920: don't ignore errors of more than one command with `|| true`

It is customary to write `A || true` to ignore a potential error exit of
command A. But when we have a sequence `A && B && C || true && D`, then
a failure of any of A, B, or C skips to D right away. This is not
intended here. Turn the command whose failure is to be ignored into a
compound command to ensure it is the only one that is allowed to fail.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3920-crlf-messages.sh