Subject: Re: [PATCH 05/13] credential: gate new fields on capability

From: Junio C Hamano <[email-masked]>
Date: Thu, 28 Mar 2024 09:13:38 -0700

Jeff King <[email-masked]> writes:

> It doesn't show up elsewhere because only bash complains, but not dash.
> Even running the test script with bash isn't enough, because
> write_script uses $SHELL_PATH under the hood. But building with "make
> SHELL_PATH=/bin/bash test" shows the problem on other platforms.

Can we sneak it in to the GitHub Actions CI, I wonder, so that we
can catch tests that only fail with bash.  Would this be sufficient,
or can we just export it without using $use_bash to place it on the
command line of make?

 ci/run-build-and-tests.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git i/ci/run-build-and-tests.sh w/ci/run-build-and-tests.sh
index c192bd613c..8fb1114bc5 100755
--- i/ci/run-build-and-tests.sh
+++ w/ci/run-build-and-tests.sh
@@ -11,6 +11,7 @@ windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
 esac
 
 run_tests=t
+use_bash=
 
 case "$jobname" in
 linux-gcc)
@@ -30,6 +31,7 @@ linux-TEST-vars)
 	export GIT_TEST_NO_WRITE_REV_INDEX=1
 	export GIT_TEST_CHECKOUT_WORKERS=2
 	export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
+	use_bash=/bin/bash
 	;;
 linux-clang)
 	export GIT_TEST_DEFAULT_HASH=sha1
@@ -51,7 +53,8 @@ esac
 group Build make
 if test -n "$run_tests"
 then
-	group "Run tests" make test ||
+	group "Run tests" \
+		make ${use_bash:+SHELL_PATH="$use_bash"} test ||
 	handle_failed_tests
 	group "Run unit tests" \
 		make DEFAULT_UNIT_TEST_TARGET=unit-tests-prove unit-tests