Skip to content

Commit 8e6bf45

Browse files
committed
tests: respect GIT_TEST_INSTALLED when initializing repositories
It really makes very, very little sense to use a different git executable than the one the caller indicated via setting the environment variable GIT_TEST_INSTALLED. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 21824b2 commit 8e6bf45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/test-lib-functions.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,8 @@ test_create_repo () {
865865
mkdir -p "$repo"
866866
(
867867
cd "$repo" || error "Cannot setup test environment"
868-
"$GIT_EXEC_PATH/git$X" init "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
868+
"${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" init \
869+
"--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
869870
error "cannot run git init -- have you built things yet?"
870871
mv .git/hooks .git/hooks-disabled
871872
) || exit

0 commit comments

Comments
 (0)