From: Johannes Schindelin Date: Mon, 12 Nov 2018 13:48:34 +0000 (-0800) Subject: tests: respect GIT_TEST_INSTALLED when initializing repositories X-Git-Tag: v2.20.0-rc1~11^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3af4c7156c4;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index d158c8d0bf..3472716651 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -923,7 +923,8 @@ test_create_repo () { mkdir -p "$repo" ( cd "$repo" || error "Cannot setup test environment" - "$GIT_EXEC_PATH/git-init" "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || + "${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git" init \ + "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || error "cannot run git init -- have you built things yet?" mv .git/hooks .git/hooks-disabled ) || exit