Skip to content

Commit

Permalink
tests: respect GIT_TEST_INSTALLED when initializing repositories
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dscho authored and gitster committed Nov 14, 2018
1 parent 16df35c commit 3af4c71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/test-lib-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3af4c71

Please sign in to comment.