Skip to content

Commit 8f0a264

Browse files
dschogitster
authored andcommitted
t5411: start adjusting the support files for init.defaultBranch=main
This trick was performed via $ sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t/t5411/test-00[3-5]* We do not convert the files in `t/t5411/` in one go because the patch would be too big (mails larger than 100kB are rejected by the Git mailing list). Instead, we start with roughly half of the support files. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3384e7 commit 8f0a264

13 files changed

+361
-361
lines changed

t/t5411/test-0030-report-ok.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@ test_expect_success "setup proc-receive hook (ok, $PROTOCOL)" '
22
write_script "$upstream/hooks/proc-receive" <<-EOF
33
printf >&2 "# proc-receive hook\n"
44
test-tool proc-receive -v \
5-
-r "ok refs/for/master/topic"
5+
-r "ok refs/for/main/topic"
66
EOF
77
'
88

9-
# Refs of upstream : master(A)
10-
# Refs of workbench: master(A) tags/v123
11-
# git push : refs/for/master/topic
9+
# Refs of upstream : main(A)
10+
# Refs of workbench: main(A) tags/v123
11+
# git push : refs/for/main/topic
1212
test_expect_success "proc-receive: ok ($PROTOCOL)" '
1313
git -C workbench push origin \
14-
HEAD:refs/for/master/topic \
14+
HEAD:refs/for/main/topic \
1515
>out 2>&1 &&
1616
make_user_friendly_and_stable_output <out >actual &&
1717
cat >expect <<-EOF &&
1818
remote: # pre-receive hook
19-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
19+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
2020
remote: # proc-receive hook
21-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
22-
remote: proc-receive> ok refs/for/master/topic
21+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
22+
remote: proc-receive> ok refs/for/main/topic
2323
remote: # post-receive hook
24-
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
24+
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
2525
To <URL/of/upstream.git>
26-
* [new reference] HEAD -> refs/for/master/topic
26+
* [new reference] HEAD -> refs/for/main/topic
2727
EOF
2828
test_cmp expect actual &&
2929
git -C "$upstream" show-ref >out &&
3030
make_user_friendly_and_stable_output <out >actual &&
3131
cat >expect <<-EOF &&
32-
<COMMIT-A> refs/heads/master
32+
<COMMIT-A> refs/heads/main
3333
EOF
3434
test_cmp expect actual
3535
'

t/t5411/test-0031-report-ok--porcelain.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ test_expect_success "setup proc-receive hook (ok, $PROTOCOL/porcelain)" '
22
write_script "$upstream/hooks/proc-receive" <<-EOF
33
printf >&2 "# proc-receive hook\n"
44
test-tool proc-receive -v \
5-
-r "ok refs/for/master/topic"
5+
-r "ok refs/for/main/topic"
66
EOF
77
'
88

9-
# Refs of upstream : master(A)
10-
# Refs of workbench: master(A) tags/v123
11-
# git push : refs/for/master/topic
9+
# Refs of upstream : main(A)
10+
# Refs of workbench: main(A) tags/v123
11+
# git push : refs/for/main/topic
1212
test_expect_success "proc-receive: ok ($PROTOCOL/porcelain)" '
1313
git -C workbench push --porcelain origin \
14-
HEAD:refs/for/master/topic \
14+
HEAD:refs/for/main/topic \
1515
>out 2>&1 &&
1616
make_user_friendly_and_stable_output <out >actual &&
1717
cat >expect <<-EOF &&
1818
remote: # pre-receive hook
19-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
19+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
2020
remote: # proc-receive hook
21-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
22-
remote: proc-receive> ok refs/for/master/topic
21+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
22+
remote: proc-receive> ok refs/for/main/topic
2323
remote: # post-receive hook
24-
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
24+
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
2525
To <URL/of/upstream.git>
26-
* HEAD:refs/for/master/topic [new reference]
26+
* HEAD:refs/for/main/topic [new reference]
2727
Done
2828
EOF
2929
test_cmp expect actual &&
3030
git -C "$upstream" show-ref >out &&
3131
make_user_friendly_and_stable_output <out >actual &&
3232
cat >expect <<-EOF &&
33-
<COMMIT-A> refs/heads/master
33+
<COMMIT-A> refs/heads/main
3434
EOF
3535
test_cmp expect actual
3636
'

t/t5411/test-0032-report-with-options.sh

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ test_expect_success "setup proc-receive hook (option without matching ok, $PROTO
77
EOF
88
'
99

10-
# Refs of upstream : master(A)
11-
# Refs of workbench: master(A) tags/v123
12-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
10+
# Refs of upstream : main(A)
11+
# Refs of workbench: main(A) tags/v123
12+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
1313
test_expect_success "proc-receive: report option without matching ok ($PROTOCOL)" '
1414
test_must_fail git -C workbench push origin \
15-
HEAD:refs/for/master/topic \
15+
HEAD:refs/for/main/topic \
1616
>out 2>&1 &&
1717
make_user_friendly_and_stable_output <out >actual &&
1818
cat >expect <<-EOF &&
1919
remote: # pre-receive hook
20-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
20+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
2121
remote: # proc-receive hook
22-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
22+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
2323
remote: proc-receive> option refname refs/pull/123/head
2424
remote: proc-receive> option old-oid <COMMIT-B>
2525
remote: error: proc-receive reported "option" without a matching "ok/ng" directive
2626
To <URL/of/upstream.git>
27-
! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)
27+
! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
2828
EOF
2929
test_cmp expect actual
3030
'
@@ -33,25 +33,25 @@ test_expect_success "setup proc-receive hook (option refname, $PROTOCOL)" '
3333
write_script "$upstream/hooks/proc-receive" <<-EOF
3434
printf >&2 "# proc-receive hook\n"
3535
test-tool proc-receive -v \
36-
-r "ok refs/for/master/topic" \
36+
-r "ok refs/for/main/topic" \
3737
-r "option refname refs/pull/123/head"
3838
EOF
3939
'
4040

41-
# Refs of upstream : master(A)
42-
# Refs of workbench: master(A) tags/v123
43-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
41+
# Refs of upstream : main(A)
42+
# Refs of workbench: main(A) tags/v123
43+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
4444
test_expect_success "proc-receive: report option refname ($PROTOCOL)" '
4545
git -C workbench push origin \
46-
HEAD:refs/for/master/topic \
46+
HEAD:refs/for/main/topic \
4747
>out 2>&1 &&
4848
make_user_friendly_and_stable_output <out >actual &&
4949
cat >expect <<-EOF &&
5050
remote: # pre-receive hook
51-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
51+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
5252
remote: # proc-receive hook
53-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
54-
remote: proc-receive> ok refs/for/master/topic
53+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
54+
remote: proc-receive> ok refs/for/main/topic
5555
remote: proc-receive> option refname refs/pull/123/head
5656
remote: # post-receive hook
5757
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head
@@ -65,25 +65,25 @@ test_expect_success "setup proc-receive hook (option refname and forced-update,
6565
write_script "$upstream/hooks/proc-receive" <<-EOF
6666
printf >&2 "# proc-receive hook\n"
6767
test-tool proc-receive -v \
68-
-r "ok refs/for/master/topic" \
68+
-r "ok refs/for/main/topic" \
6969
-r "option refname refs/pull/123/head" \
7070
-r "option forced-update"
7171
EOF
7272
'
73-
# Refs of upstream : master(A)
74-
# Refs of workbench: master(A) tags/v123
75-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
73+
# Refs of upstream : main(A)
74+
# Refs of workbench: main(A) tags/v123
75+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
7676
test_expect_success "proc-receive: report option refname and forced-update ($PROTOCOL)" '
7777
git -C workbench push origin \
78-
HEAD:refs/for/master/topic \
78+
HEAD:refs/for/main/topic \
7979
>out 2>&1 &&
8080
make_user_friendly_and_stable_output <out >actual &&
8181
cat >expect <<-EOF &&
8282
remote: # pre-receive hook
83-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
83+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
8484
remote: # proc-receive hook
85-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
86-
remote: proc-receive> ok refs/for/master/topic
85+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
86+
remote: proc-receive> ok refs/for/main/topic
8787
remote: proc-receive> option refname refs/pull/123/head
8888
remote: proc-receive> option forced-update
8989
remote: # post-receive hook
@@ -98,26 +98,26 @@ test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTO
9898
write_script "$upstream/hooks/proc-receive" <<-EOF
9999
printf >&2 "# proc-receive hook\n"
100100
test-tool proc-receive -v \
101-
-r "ok refs/for/master/topic" \
101+
-r "ok refs/for/main/topic" \
102102
-r "option refname refs/pull/123/head" \
103103
-r "option old-oid $B"
104104
EOF
105105
'
106106

107-
# Refs of upstream : master(A)
108-
# Refs of workbench: master(A) tags/v123
109-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
107+
# Refs of upstream : main(A)
108+
# Refs of workbench: main(A) tags/v123
109+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
110110
test_expect_success "proc-receive: report option refname and old-oid ($PROTOCOL)" '
111111
git -C workbench push origin \
112-
HEAD:refs/for/master/topic \
112+
HEAD:refs/for/main/topic \
113113
>out 2>&1 &&
114114
make_user_friendly_and_stable_output <out >actual &&
115115
cat >expect <<-EOF &&
116116
remote: # pre-receive hook
117-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
117+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
118118
remote: # proc-receive hook
119-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
120-
remote: proc-receive> ok refs/for/master/topic
119+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
120+
remote: proc-receive> ok refs/for/main/topic
121121
remote: proc-receive> option refname refs/pull/123/head
122122
remote: proc-receive> option old-oid <COMMIT-B>
123123
remote: # post-receive hook
@@ -132,30 +132,30 @@ test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL)" '
132132
write_script "$upstream/hooks/proc-receive" <<-EOF
133133
printf >&2 "# proc-receive hook\n"
134134
test-tool proc-receive -v \
135-
-r "ok refs/for/master/topic" \
135+
-r "ok refs/for/main/topic" \
136136
-r "option old-oid $B"
137137
EOF
138138
'
139139

140-
# Refs of upstream : master(A)
141-
# Refs of workbench: master(A) tags/v123
142-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
140+
# Refs of upstream : main(A)
141+
# Refs of workbench: main(A) tags/v123
142+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
143143
test_expect_success "proc-receive: report option old-oid ($PROTOCOL)" '
144144
git -C workbench push origin \
145-
HEAD:refs/for/master/topic \
145+
HEAD:refs/for/main/topic \
146146
>out 2>&1 &&
147147
make_user_friendly_and_stable_output <out >actual &&
148148
cat >expect <<-EOF &&
149149
remote: # pre-receive hook
150-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
150+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
151151
remote: # proc-receive hook
152-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
153-
remote: proc-receive> ok refs/for/master/topic
152+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
153+
remote: proc-receive> ok refs/for/main/topic
154154
remote: proc-receive> option old-oid <COMMIT-B>
155155
remote: # post-receive hook
156-
remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic
156+
remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic
157157
To <URL/of/upstream.git>
158-
<OID-B>..<OID-A> HEAD -> refs/for/master/topic
158+
<OID-B>..<OID-A> HEAD -> refs/for/main/topic
159159
EOF
160160
test_cmp expect actual
161161
'
@@ -164,32 +164,32 @@ test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTO
164164
write_script "$upstream/hooks/proc-receive" <<-EOF
165165
printf >&2 "# proc-receive hook\n"
166166
test-tool proc-receive -v \
167-
-r "ok refs/for/master/topic" \
167+
-r "ok refs/for/main/topic" \
168168
-r "option old-oid $A" \
169169
-r "option new-oid $B"
170170
EOF
171171
'
172172

173-
# Refs of upstream : master(A)
174-
# Refs of workbench: master(A) tags/v123
175-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
173+
# Refs of upstream : main(A)
174+
# Refs of workbench: main(A) tags/v123
175+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
176176
test_expect_success "proc-receive: report option old-oid and new-oid ($PROTOCOL)" '
177177
git -C workbench push origin \
178-
HEAD:refs/for/master/topic \
178+
HEAD:refs/for/main/topic \
179179
>out 2>&1 &&
180180
make_user_friendly_and_stable_output <out >actual &&
181181
cat >expect <<-EOF &&
182182
remote: # pre-receive hook
183-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
183+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
184184
remote: # proc-receive hook
185-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
186-
remote: proc-receive> ok refs/for/master/topic
185+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
186+
remote: proc-receive> ok refs/for/main/topic
187187
remote: proc-receive> option old-oid <COMMIT-A>
188188
remote: proc-receive> option new-oid <COMMIT-B>
189189
remote: # post-receive hook
190-
remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
190+
remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
191191
To <URL/of/upstream.git>
192-
<OID-A>..<OID-B> HEAD -> refs/for/master/topic
192+
<OID-A>..<OID-B> HEAD -> refs/for/main/topic
193193
EOF
194194
test_cmp expect actual
195195
'
@@ -201,37 +201,37 @@ test_expect_success "setup proc-receive hook (report with multiple rewrites, $PR
201201
-r "ok refs/for/a/b/c/topic" \
202202
-r "ok refs/for/next/topic" \
203203
-r "option refname refs/pull/123/head" \
204-
-r "ok refs/for/master/topic" \
204+
-r "ok refs/for/main/topic" \
205205
-r "option refname refs/pull/124/head" \
206206
-r "option old-oid $B" \
207207
-r "option forced-update" \
208208
-r "option new-oid $A"
209209
EOF
210210
'
211211

212-
# Refs of upstream : master(A)
213-
# Refs of workbench: master(A) tags/v123
214-
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/master/topic(A)
212+
# Refs of upstream : main(A)
213+
# Refs of workbench: main(A) tags/v123
214+
# git push : refs/for/next/topic(A) refs/for/a/b/c/topic(A) refs/for/main/topic(A)
215215
test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL)" '
216216
git -C workbench push origin \
217217
HEAD:refs/for/next/topic \
218218
HEAD:refs/for/a/b/c/topic \
219-
HEAD:refs/for/master/topic \
219+
HEAD:refs/for/main/topic \
220220
>out 2>&1 &&
221221
make_user_friendly_and_stable_output <out >actual &&
222222
cat >expect <<-EOF &&
223223
remote: # pre-receive hook
224224
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
225225
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic
226-
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
226+
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
227227
remote: # proc-receive hook
228228
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
229229
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic
230-
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
230+
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
231231
remote: proc-receive> ok refs/for/a/b/c/topic
232232
remote: proc-receive> ok refs/for/next/topic
233233
remote: proc-receive> option refname refs/pull/123/head
234-
remote: proc-receive> ok refs/for/master/topic
234+
remote: proc-receive> ok refs/for/main/topic
235235
remote: proc-receive> option refname refs/pull/124/head
236236
remote: proc-receive> option old-oid <COMMIT-B>
237237
remote: proc-receive> option forced-update
@@ -250,7 +250,7 @@ test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL)" '
250250
git -C "$upstream" show-ref >out &&
251251
make_user_friendly_and_stable_output <out >actual &&
252252
cat >expect <<-EOF &&
253-
<COMMIT-A> refs/heads/master
253+
<COMMIT-A> refs/heads/main
254254
EOF
255255
test_cmp expect actual
256256
'

0 commit comments

Comments
 (0)