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>

Johannes Schindelin committed Oct 31, 2020 at 19:46 UTC f3384e77942e36476eb2d313682203713854cc06
1 file changed +15 -7
t/t5411-proc-receive-hook.sh
+15 -7
@@ -5,13 +5,21 @@
5
6 test_description='Test proc-receive hook'
7
8 +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
9 +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10 +
11 . ./test-lib.sh
12
13 +test_have_prereq PREPARE_FOR_MAIN_BRANCH || {
14 + test_skip="In transit for the default branch name 'main'"
15 + test_done
16 +}
17 +
18 . "$TEST_DIRECTORY"/t5411/common-functions.sh
19
20 setup_upstream_and_workbench () {
13 - # Refs of upstream : master(A)
14 - # Refs of workbench: master(A) tags/v123
21 + # Refs of upstream : main(A)
22 + # Refs of workbench: main(A) tags/v123
23 test_expect_success "setup upstream and workbench" '
24 rm -rf upstream.git &&
25 rm -rf workbench &&
@@ -25,10 +33,10 @@ setup_upstream_and_workbench () {
33 git config core.abbrev 7 &&
34 git tag -m "v123" v123 $A &&
35 git remote add origin ../upstream.git &&
28 - git push origin master &&
29 - git update-ref refs/heads/master $A $B &&
36 + git push origin main &&
37 + git update-ref refs/heads/main $A $B &&
38 git -C ../upstream.git update-ref \
31 - refs/heads/master $A $B
39 + refs/heads/main $A $B
40 ) &&
41 TAG=$(git -C workbench rev-parse v123) &&
42
@@ -99,8 +107,8 @@ start_httpd
107 # Re-initialize the upstream repository and local workbench.
108 setup_upstream_and_workbench
109
102 -# Refs of upstream : master(A)
103 -# Refs of workbench: master(A) tags/v123
110 +# Refs of upstream : main(A)
111 +# Refs of workbench: main(A) tags/v123
112 test_expect_success "setup for HTTP protocol" '
113 git -C upstream.git config http.receivepack true &&
114 upstream="$HTTPD_DOCUMENT_ROOT_PATH/upstream.git" &&