summaryrefslogtreecommitdiff
path: root/t/t5550-http-fetch-dumb.sh
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-04-18 23:17:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-19 04:27:08 (GMT)
commit1fd1a919ce9135a34866d5d13aed5312ea5e07f1 (patch)
tree8ef15e684c40f76b373fa74454269b2886d77d3b /t/t5550-http-fetch-dumb.sh
parent584f8975d2d9530a34bd0b936ae774f82fe30fed (diff)
downloadgit-1fd1a919ce9135a34866d5d13aed5312ea5e07f1.zip
git-1fd1a919ce9135a34866d5d13aed5312ea5e07f1.tar.gz
git-1fd1a919ce9135a34866d5d13aed5312ea5e07f1.tar.bz2
t5550: use write_script to generate post-update hook
The post-update hooks created in t5550-http-fetch-dumb.sh is missing the "!#/bin/sh" line which can cause issues with portability. Instead create the hook using the 'write_script' function which includes the proper "#!" line. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5550-http-fetch-dumb.sh')
-rwxr-xr-xt/t5550-http-fetch-dumb.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index 87308cd..8552184 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -20,8 +20,9 @@ test_expect_success 'create http-accessible bare repository with loose objects'
(cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
git config core.bare true &&
mkdir -p hooks &&
- echo "exec git update-server-info" >hooks/post-update &&
- chmod +x hooks/post-update &&
+ write_script "hooks/post-update" <<-\EOF &&
+ exec git update-server-info
+ EOF
hooks/post-update
) &&
git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&