Skip to content

Commit f3384e7

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3224b0f commit f3384e7

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

t/t5411-proc-receive-hook.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@
55

66
test_description='Test proc-receive hook'
77

8+
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
9+
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10+
811
. ./test-lib.sh
912

13+
test_have_prereq PREPARE_FOR_MAIN_BRANCH || {
14+
test_skip="In transit for the default branch name 'main'"
15+
test_done
16+
}
17+
1018
. "$TEST_DIRECTORY"/t5411/common-functions.sh
1119

1220
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
1523
test_expect_success "setup upstream and workbench" '
1624
rm -rf upstream.git &&
1725
rm -rf workbench &&
@@ -25,10 +33,10 @@ setup_upstream_and_workbench () {
2533
git config core.abbrev 7 &&
2634
git tag -m "v123" v123 $A &&
2735
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 &&
3038
git -C ../upstream.git update-ref \
31-
refs/heads/master $A $B
39+
refs/heads/main $A $B
3240
) &&
3341
TAG=$(git -C workbench rev-parse v123) &&
3442
@@ -99,8 +107,8 @@ start_httpd
99107
# Re-initialize the upstream repository and local workbench.
100108
setup_upstream_and_workbench
101109

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
104112
test_expect_success "setup for HTTP protocol" '
105113
git -C upstream.git config http.receivepack true &&
106114
upstream="$HTTPD_DOCUMENT_ROOT_PATH/upstream.git" &&

0 commit comments

Comments
 (0)