Re: [PATCH 01/12] t: prepare `test_match_signal ()` calls for `set -e`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 14, 2026, 17:49 UTC
- Message-ID
- <xmqqtstda0vn.fsf@gitster.g>
- In-Reply-To
- <ad3rbjDYad8rTybG@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 6 quoted lines
> How about the below patch? It's a mouthful, but the intent is quite > explicit and it's overall not too bad, if you ask me. > > test_expect_success !MINGW 'a constipated git dies with SIGPIPE' ' > - OUT=$( ((large_git || echo $? 1>&3) | :) 3>&1 ) && > + OUT=$( ((large_git && echo 0 1>&3 || echo $? 1>&3) | :) 3>&1 ) &&
Ah, I like it slightly better than "st=0; large_git || st=$?" pattern, but yes, it is mouthful.