]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: respect GIT_TEST_INSTALLED when initializing repositories
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 12 Nov 2018 13:48:34 +0000 (05:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Nov 2018 04:50:20 +0000 (13:50 +0900)
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>
t/test-lib-functions.sh

index d158c8d0bf704646b2ce764fe96a849fb0303c2f..3472716651b7c28c7e4623398699062f51810863 100644 (file)
@@ -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