http tests: don't rely on "hook/post-update.sample"
Change code added in a87679339c0 (test: rename http fetch and push test files, 2014-02-06) to stop relying on the "exec git update-server-info" in "templates/hooks--post-update.sample", let's instead inline the expected hook in the test itself. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Mar 17, 2022 at 11:13 UTC
94945322baf222993d72d472a6d9d8dcb0b35893
1 file changed
+3
-1
t/t5540-http-push-webdav.sh
+3
-1
@@ -42,7 +42,9 @@ test_expect_success 'setup remote repository' '
42
git clone --bare test_repo test_repo.git &&
43
cd test_repo.git &&
44
git --bare update-server-info &&
45
- mv hooks/post-update.sample hooks/post-update &&
45
+ test_hook --setup post-update <<-\EOF &&
46
+ exec git update-server-info
47
+ EOF
48
ORIG_HEAD=$(git rev-parse --verify HEAD) &&
49
cd - &&
50
mv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"