]> git.ipfire.org Git - thirdparty/git.git/commitdiff
http tests: don't rely on "hook/post-update.sample"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 17 Mar 2022 10:13:08 +0000 (11:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Mar 2022 15:40:26 +0000 (08:40 -0700)
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>
t/t5540-http-push-webdav.sh

index b0dbacf0b9b5ee8300368c1defe54cf87ce3ee05..37db3dec0c5b3939c9cb6f2e6f6e383c80045c87 100755 (executable)
@@ -42,7 +42,9 @@ test_expect_success 'setup remote repository' '
        git clone --bare test_repo test_repo.git &&
        cd test_repo.git &&
        git --bare update-server-info &&
-       mv hooks/post-update.sample hooks/post-update &&
+       test_hook --setup post-update <<-\EOF &&
+       exec git update-server-info
+       EOF
        ORIG_HEAD=$(git rev-parse --verify HEAD) &&
        cd - &&
        mv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"