Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2009-04-21 13:21:59 +0400
committerJunio C Hamano <gitster@pobox.com>2009-04-21 20:49:04 +0400
commit3a0483281afbb6660aaf86c7b228a523782a4d6a (patch)
tree15550e942e5a5599ff1525258c546d025fadeb4d /t
parent0be9bc0f0a45ba667e7aaca14257da772b38e783 (diff)
test-lib.sh: Help test_create_repo() find the templates dir
Currently, test_create_repo() expects that templates can be found below `pwd`/.. This assumption fails when tests are run against a git installed somewhere else or test_create_repo() is called from subdirectiories (several tests do this). Therefore, use $TEST_DIRECTORY as introduced in 2d84e9fb and expect templates to be present in $TEST_DIRECTORY/.. which should be the root dir of the git checkout. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 4bd986f430..dad1437fa4 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -491,7 +491,7 @@ test_create_repo () {
repo="$1"
mkdir -p "$repo"
cd "$repo" || error "Cannot setup test environment"
- "$GIT_EXEC_PATH/git-init" "--template=$owd/../templates/blt/" >&3 2>&4 ||
+ "$GIT_EXEC_PATH/git-init" "--template=$TEST_DIRECTORY/../templates/blt/" >&3 2>&4 ||
error "cannot run git init -- have you built things yet?"
mv .git/hooks .git/hooks-disabled
cd "$owd"