[StGit PATCH 4/7] Set GIT_TEMPLATE_DIR in the testsuite, like it's done in git

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Catalin Marinas <catalin.marinas@...>
Cc: <git@...>, Pavel Roskin <proski@...>, Karl <kha@...>
Date: Tuesday, September 11, 2007 - 12:50 am

From: Pavel Roskin <proski@gnu.org>

Otherwise, the git configuration affects the testsuite.  Since we don't
have git templates in the source tree, use our "template" directory.
No templates are really needed, it's just a directory with known
contents.

Remove the command that moves .git/hooks away, as it's not created
anymore.  Create empty .git/info/, as some tests assume it to exist.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 t/test-lib.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/t/test-lib.sh b/t/test-lib.sh
index 4bb00fb..2d12f1b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -228,7 +228,7 @@ test_create_repo () {
 	cd "$repo" || error "Cannot setup test environment"
 	git-init >/dev/null 2>&1 ||
 	error "cannot run git-init -- have you installed git-core?"
-	mv .git/hooks .git/hooks-disabled
+	mkdir .git/info
 	echo "empty start" |
 	git-commit-tree `git-write-tree` >.git/refs/heads/master 2>&4 ||
 	error "cannot run git-commit -- is your git-core functioning?"
@@ -261,8 +261,9 @@ test_done () {
 # t/ subdirectory and are run in trash subdirectory.
 PATH=$(pwd)/..:$PATH
 HOME=$(pwd)/trash
+GIT_TEMPLATE_DIR=$(pwd)/../templates
 GIT_CONFIG=.git/config
-export PATH HOME GIT_CONFIG
+export PATH HOME GIT_TEMPLATE_DIR GIT_CONFIG
 
 
 # Test repository

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[StGit PATCH 0/7] Assorted enhancements, Karl , (Tue Sep 11, 12:49 am)
[StGit PATCH 4/7] Set GIT_TEMPLATE_DIR in the testsuite, lik..., Karl , (Tue Sep 11, 12:50 am)