From: Junio C Hamano Date: Sat, 18 Apr 2026 19:24:53 GMT Subject: Re: [PATCH v4 12/12] t: detect errors outside of test cases Message-ID: In-Reply-To: <20260418174446.GA1695@coredump.intra.peff.net> Jeff King writes: > On Sat, Apr 18, 2026 at 08:17:10AM -0400, Ben Knoble wrote: > >> > +if test "$GIT_TEST_USE_SET_E" = 1 && test "${BASH_VERSINFO:=0}" -ge 5 >> > then >> > set -e >> > fi >> >> I guess that should be || instead of &&? > > Oops, yeah. I wrote it correctly and tested it once, and then started to > rewrite it to support setting it to 0, like: > > if test -z "$GIT_TEST_USE_SET_E" && test "${BASH_VERSINFO:=0}" -ge 5 > then > GIT_TEST_USE_SET_E=1 > fi > case "$GIT_TEST_USE_SET_E" in > 1|on|true) > set -e > ;; > esac > > But I didn't want to get too much into details of the patch, so I went > back to the original, but obviously screwed that up. ;) We could forget about "we know this is a good shell by its name and version" and test the feature we depend on ourselves, perhaps?