git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix testsuite to not use any hooks possibly provided by source

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Sep 23, 2009, 18:30 UTC
Message-ID
<20090923183023.GA85456@book.hvoigt.net>

This is useful if you are using the testsuite with local changes that include activated default hooks suitable for your teams installation. In some cases the pre-commit or other hooks can prevent the testsuite from getting the expected result.

Currently all example hooks in the main git repository are deactivated so it makes no difference when running the testsuite without any. In case a future testcase wants to test a default hooks behavior it should copy it locally.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
---
or would you say that we need hooks in the testsuite template?
 t/test-lib.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f2ca536..446ab57 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -626,7 +626,7 @@ else
 	GIT_EXEC_PATH=$GIT_VALGRIND/bin
 	export GIT_VALGRIND
 fi
-GIT_TEMPLATE_DIR=$(pwd)/../templates/blt
+GIT_TEMPLATE_DIR=$(pwd)/trash\ directory.templates
 unset GIT_CONFIG
 GIT_CONFIG_NOSYSTEM=1
 GIT_CONFIG_NOGLOBAL=1
@@ -638,6 +638,11 @@ test -d ../templates/blt || {
 	error "You haven't built things yet, have you?"
 }
 
+test -d "$GIT_TEMPLATE_DIR" || {
+	cp -r ../templates/blt "$GIT_TEMPLATE_DIR"
+	rm -f "$GIT_TEMPLATE_DIR"/hooks/*
+}
+
 if ! test -x ../test-chmtime; then
 	echo >&2 'You need to build test-chmtime:'
 	echo >&2 'Run "make test-chmtime" in the source (toplevel) directory'
-- 
1.6.5.rc1.12.gc72fe
Message 1 of 1 in “fix testsuite to not use any hooks possibly provided by source”
  1. fix testsuite to not use any hooks possibly provided by sourceHeiko Voigt, Sep 23, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.