Skip to content

Commit 3af4c71

Browse files
dschogitster
authored andcommitted
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]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 16df35c commit 3af4c71

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
@@ -923,7 +923,8 @@ test_create_repo () {
923923
mkdir -p "$repo"
924924
(
925925
cd "$repo" || error "Cannot setup test environment"
926-
"$GIT_EXEC_PATH/git-init" "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
926+
"${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git" init \
927+
"--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
927928
error "cannot run git init -- have you built things yet?"
928929
mv .git/hooks .git/hooks-disabled
929930
) || exit

0 commit comments

Comments
 (0)