summaryrefslogtreecommitdiff
path: root/t/t5411-proc-receive-hook.sh
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-10-31 19:46:00 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-10-31 13:15:16 -0700
commitf3384e77942e36476eb2d313682203713854cc06 (patch)
treef89e98dd0dcc1d6f2d7ed6692f3ec1ab8e300325 /t/t5411-proc-receive-hook.sh
parentt1400: prepare for `main` being default branch name (diff)
downloadtgif-f3384e77942e36476eb2d313682203713854cc06.tar.xz
t5411: start using the default branch name "main"
This is a straight-forward search-and-replace in the test script; However, this is not yet complete because it requires many more replacements in `t/t5411/`, too many for a single patch (the Git mailing list rejects mails larger than 100kB). For that reason, we disable this test script temporarily via the `PREPARE_FOR_MAIN_BRANCH` prereq. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5411-proc-receive-hook.sh')
-rwxr-xr-xt/t5411-proc-receive-hook.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh
index 746487286f..6da6f597a5 100755
--- a/t/t5411-proc-receive-hook.sh
+++ b/t/t5411-proc-receive-hook.sh
@@ -5,13 +5,21 @@
test_description='Test proc-receive hook'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
+test_have_prereq PREPARE_FOR_MAIN_BRANCH || {
+ test_skip="In transit for the default branch name 'main'"
+ test_done
+}
+
. "$TEST_DIRECTORY"/t5411/common-functions.sh
setup_upstream_and_workbench () {
- # Refs of upstream : master(A)
- # Refs of workbench: master(A) tags/v123
+ # Refs of upstream : main(A)
+ # Refs of workbench: main(A) tags/v123
test_expect_success "setup upstream and workbench" '
rm -rf upstream.git &&
rm -rf workbench &&
@@ -25,10 +33,10 @@ setup_upstream_and_workbench () {
git config core.abbrev 7 &&
git tag -m "v123" v123 $A &&
git remote add origin ../upstream.git &&
- git push origin master &&
- git update-ref refs/heads/master $A $B &&
+ git push origin main &&
+ git update-ref refs/heads/main $A $B &&
git -C ../upstream.git update-ref \
- refs/heads/master $A $B
+ refs/heads/main $A $B
) &&
TAG=$(git -C workbench rev-parse v123) &&
@@ -99,8 +107,8 @@ start_httpd
# Re-initialize the upstream repository and local workbench.
setup_upstream_and_workbench
-# Refs of upstream : master(A)
-# Refs of workbench: master(A) tags/v123
+# Refs of upstream : main(A)
+# Refs of workbench: main(A) tags/v123
test_expect_success "setup for HTTP protocol" '
git -C upstream.git config http.receivepack true &&
upstream="$HTTPD_DOCUMENT_ROOT_PATH/upstream.git" &&