From: Junio C Hamano Date: Tue, 14 Apr 2026 13:41:39 GMT Subject: Re: [PATCH 06/12] t: prepare execution of potentially failing commands for `set -e` Message-ID: In-Reply-To: Patrick Steinhardt writes: > I'm a bit confused. We do exactly that in "test-lib.sh" now, see the > below hunk that is part of this patch. Am I missing something? No, I was misreading the patch and "$GIT_BINARY" >/dev/null in *preimage* was pulling my attention away from the fixed one with "version". Thanks for correcting me. > > Patrick > >> > diff --git a/t/test-lib.sh b/t/test-lib.sh >> > index 70fd3e9baf..81380fe978 100644 >> > --- a/t/test-lib.sh >> > +++ b/t/test-lib.sh >> > @@ -143,8 +143,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME >> > ################################################################ >> > # It appears that people try to run tests without building... >> > GIT_BINARY="${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >> > -"$GIT_BINARY" >/dev/null >> > -if test $? != 1 >> > + >> > +if ! "$GIT_BINARY" version >/dev/null >> > then >> > if test -n "$GIT_TEST_INSTALLED" >> > then