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

From: Jeff King <[email-masked]>
Date: Mon, 20 Apr 2026 23:00:45 -0400

On Mon, Apr 20, 2026 at 09:19:12AM -0700, Junio C Hamano wrote:

> 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?

Yes, I think it would only fail on a broken shell. It's not _wrong_ to
protect against it, but it's the tip of the iceberg. There are many
other spots that rely on "set -e" being suppressed inside test snippets,
not the least of which is every single final command in each snippet
(because it's at the end of the &&-chain).

So I think it is better to draw the line at things that actually trigger
with working shells.

-Peff