{"thread":{"id":"21038","subject":"[PATCH] fix testsuite to not use any hooks possibly provided by source","startedAt":"2009-09-23T18:30:28Z","lastAt":"2009-09-23T18:30:28Z","messageCount":1,"participants":["Heiko Voigt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"123681","messageId":"20090923183023.GA85456@book.hvoigt.net","threadId":"21038","inReplyTo":null,"subject":"[PATCH] fix testsuite to not use any hooks possibly provided by source","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2009-09-23T18:30:28Z","receivedAt":"2009-09-23T18:30:28Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"This is useful if you are using the testsuite with local changes that\ninclude activated default hooks suitable for your teams installation.\nIn some cases the pre-commit or other hooks can prevent the testsuite\nfrom getting the expected result.\n\nCurrently all example hooks in the main git repository are deactivated\nso it makes no difference when running the testsuite without any. In\ncase a future testcase wants to test a default hooks behavior it should\ncopy it locally.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\nor would you say that we need hooks in the testsuite template?\n\n t/test-lib.sh |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex f2ca536..446ab57 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -626,7 +626,7 @@ else\n \tGIT_EXEC_PATH=$GIT_VALGRIND/bin\n \texport GIT_VALGRIND\n fi\n-GIT_TEMPLATE_DIR=$(pwd)/../templates/blt\n+GIT_TEMPLATE_DIR=$(pwd)/trash\\ directory.templates\n unset GIT_CONFIG\n GIT_CONFIG_NOSYSTEM=1\n GIT_CONFIG_NOGLOBAL=1\n@@ -638,6 +638,11 @@ test -d ../templates/blt || {\n \terror \"You haven't built things yet, have you?\"\n }\n \n+test -d \"$GIT_TEMPLATE_DIR\" || {\n+\tcp -r ../templates/blt \"$GIT_TEMPLATE_DIR\"\n+\trm -f \"$GIT_TEMPLATE_DIR\"/hooks/*\n+}\n+\n if ! test -x ../test-chmtime; then\n \techo >&2 'You need to build test-chmtime:'\n \techo >&2 'Run \"make test-chmtime\" in the source (toplevel) directory'\n-- \n1.6.5.rc1.12.gc72fe\n"}]}