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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Nov 12, 2018 at 05:48 UTC 3af4c7156c45401ab67c008faefe113563597164
1 file changed +2 -1
t/test-lib-functions.sh
+2 -1
@@ -923,7 +923,8 @@ test_create_repo () {
923 mkdir -p "$repo"
924 (
925 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 ||
928 error "cannot run git init -- have you built things yet?"
929 mv .git/hooks .git/hooks-disabled
930 ) || exit