From 3f1835f34136c53d4b141404fd784d211d6b5579 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 08:11:33 -1000 Subject: Pin what the test library reads from the shell An exported TEST_OUTPUT_DIRECTORY made every script bail out, and an exported GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main failed t0102. --- tests/setup.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/setup.sh b/tests/setup.sh index a083f75..4eab52c 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -35,8 +35,15 @@ IFS=$LF set -- $test_argv IFS=$OLDIFS -: ${TEST_DIRECTORY=$(pwd)/../vendor/git/t} -: ${TEST_OUTPUT_DIRECTORY=$(pwd)} +# The library takes these from the environment when they are set there, so +# they are set outright, or a shell set up for work on Git itself would point +# the suite at another library and every path below at another tree. The +# fixtures and many tests name master, which the library would otherwise take +# from the same environment, or from a Git built with its breaking changes. +TEST_DIRECTORY=$(pwd)/../vendor/git/t +TEST_OUTPUT_DIRECTORY=$(pwd) +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME # The library would otherwise leave a repository of its own in the trash # directory, and every repository these tests want is built by mkrepo below. TEST_NO_CREATE_REPO=YesPlease -- cgit 2.12.1