summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2018-11-12 05:48:34 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-14 13:50:20 +0900
commit3af4c7156c45401ab67c008faefe113563597164 (patch)
tree3db9379998cfdb7d9cbe5a289b55a158b9818f3a /t/test-lib-functions.sh
parenttests: fix GIT_TEST_INSTALLED's PATH to include t/helper/ (diff)
downloadtgif-3af4c7156c45401ab67c008faefe113563597164.tar.xz
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>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh3
1 files changed, 2 insertions, 1 deletions
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