Subject: Re: [PATCH v5 00/12] t: detect errors outside of test cases

From: Junio C Hamano <[email-masked]>
Date: Mon, 20 Apr 2026 09:19:12 -0700

Patrick Steinhardt <[email-masked]> writes:

> I've created an MR with GitLab [2] and a PR with GitHub [3] to verify
> that these changes work on both platforms.
>
> Changes in v5:
>   - Allow opting in via `GIT_TEST_USE_SET_E=yes` and enable this option
>     for Linux CI jobs.
>   - Another fix for a potentially-failing command.
>   - Link to v4: https://patch.msgid.link/[email-masked]

I agree that the explicit GIT_TEST_USE_SET_E option is a good way to
go, as it would be clear which ones are (and which ones are not)
using it.  I am not sure why we have check_fsck() thing?  Wasn't it
determined that this would fail only with a broken shells, or is it
futureproofing just in case the function is used without being
tested?

Also you updated in your earlier round to make everybody to use "|| :"
not "|| true".  Either would work, but this sticks out.

>     + ## t/t1410-reflog.sh ##
>     +@@ t/t1410-reflog.sh: check_have () {
>     + }
>     + 
>     + check_fsck () {
>     +-	git fsck --full >fsck.output
>     ++	git fsck --full >fsck.output || true
>     + 	case "$1" in
>     + 	'')
>     + 		test_must_be_empty fsck.output ;;
>     +