Skip to content

Commit 1fd1a91

Browse files
bmwillgitster
authored andcommitted
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>
1 parent 584f897 commit 1fd1a91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t5550-http-fetch-dumb.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ test_expect_success 'create http-accessible bare repository with loose objects'
2020
(cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
2121
git config core.bare true &&
2222
mkdir -p hooks &&
23-
echo "exec git update-server-info" >hooks/post-update &&
24-
chmod +x hooks/post-update &&
23+
write_script "hooks/post-update" <<-\EOF &&
24+
exec git update-server-info
25+
EOF
2526
hooks/post-update
2627
) &&
2728
git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&

0 commit comments

Comments
 (0)