@@ -7,24 +7,24 @@ test_expect_success "setup proc-receive hook (option without matching ok, $PROTO
7
7
EOF
8
8
'
9
9
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)
13
13
test_expect_success " proc-receive: report option without matching ok ($PROTOCOL )" '
14
14
test_must_fail git -C workbench push origin \
15
- HEAD:refs/for/master /topic \
15
+ HEAD:refs/for/main /topic \
16
16
>out 2>&1 &&
17
17
make_user_friendly_and_stable_output <out >actual &&
18
18
cat >expect <<-EOF &&
19
19
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
21
21
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
23
23
remote: proc-receive> option refname refs/pull/123/head
24
24
remote: proc-receive> option old-oid <COMMIT-B>
25
25
remote: error: proc-receive reported "option" without a matching "ok/ng" directive
26
26
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)
28
28
EOF
29
29
test_cmp expect actual
30
30
'
@@ -33,25 +33,25 @@ test_expect_success "setup proc-receive hook (option refname, $PROTOCOL)" '
33
33
write_script "$upstream/hooks/proc-receive" <<-EOF
34
34
printf >&2 "# proc-receive hook\n"
35
35
test-tool proc-receive -v \
36
- -r "ok refs/for/master /topic" \
36
+ -r "ok refs/for/main /topic" \
37
37
-r "option refname refs/pull/123/head"
38
38
EOF
39
39
'
40
40
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)
44
44
test_expect_success " proc-receive: report option refname ($PROTOCOL )" '
45
45
git -C workbench push origin \
46
- HEAD:refs/for/master /topic \
46
+ HEAD:refs/for/main /topic \
47
47
>out 2>&1 &&
48
48
make_user_friendly_and_stable_output <out >actual &&
49
49
cat >expect <<-EOF &&
50
50
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
52
52
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
55
55
remote: proc-receive> option refname refs/pull/123/head
56
56
remote: # post-receive hook
57
57
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,
65
65
write_script "$upstream/hooks/proc-receive" <<-EOF
66
66
printf >&2 "# proc-receive hook\n"
67
67
test-tool proc-receive -v \
68
- -r "ok refs/for/master /topic" \
68
+ -r "ok refs/for/main /topic" \
69
69
-r "option refname refs/pull/123/head" \
70
70
-r "option forced-update"
71
71
EOF
72
72
'
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)
76
76
test_expect_success " proc-receive: report option refname and forced-update ($PROTOCOL )" '
77
77
git -C workbench push origin \
78
- HEAD:refs/for/master /topic \
78
+ HEAD:refs/for/main /topic \
79
79
>out 2>&1 &&
80
80
make_user_friendly_and_stable_output <out >actual &&
81
81
cat >expect <<-EOF &&
82
82
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
84
84
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
87
87
remote: proc-receive> option refname refs/pull/123/head
88
88
remote: proc-receive> option forced-update
89
89
remote: # post-receive hook
@@ -98,26 +98,26 @@ test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTO
98
98
write_script "$upstream/hooks/proc-receive" <<-EOF
99
99
printf >&2 "# proc-receive hook\n"
100
100
test-tool proc-receive -v \
101
- -r "ok refs/for/master /topic" \
101
+ -r "ok refs/for/main /topic" \
102
102
-r "option refname refs/pull/123/head" \
103
103
-r "option old-oid $B"
104
104
EOF
105
105
'
106
106
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)
110
110
test_expect_success " proc-receive: report option refname and old-oid ($PROTOCOL )" '
111
111
git -C workbench push origin \
112
- HEAD:refs/for/master /topic \
112
+ HEAD:refs/for/main /topic \
113
113
>out 2>&1 &&
114
114
make_user_friendly_and_stable_output <out >actual &&
115
115
cat >expect <<-EOF &&
116
116
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
118
118
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
121
121
remote: proc-receive> option refname refs/pull/123/head
122
122
remote: proc-receive> option old-oid <COMMIT-B>
123
123
remote: # post-receive hook
@@ -132,30 +132,30 @@ test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL)" '
132
132
write_script "$upstream/hooks/proc-receive" <<-EOF
133
133
printf >&2 "# proc-receive hook\n"
134
134
test-tool proc-receive -v \
135
- -r "ok refs/for/master /topic" \
135
+ -r "ok refs/for/main /topic" \
136
136
-r "option old-oid $B"
137
137
EOF
138
138
'
139
139
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)
143
143
test_expect_success " proc-receive: report option old-oid ($PROTOCOL )" '
144
144
git -C workbench push origin \
145
- HEAD:refs/for/master /topic \
145
+ HEAD:refs/for/main /topic \
146
146
>out 2>&1 &&
147
147
make_user_friendly_and_stable_output <out >actual &&
148
148
cat >expect <<-EOF &&
149
149
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
151
151
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
154
154
remote: proc-receive> option old-oid <COMMIT-B>
155
155
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
157
157
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
159
159
EOF
160
160
test_cmp expect actual
161
161
'
@@ -164,32 +164,32 @@ test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTO
164
164
write_script "$upstream/hooks/proc-receive" <<-EOF
165
165
printf >&2 "# proc-receive hook\n"
166
166
test-tool proc-receive -v \
167
- -r "ok refs/for/master /topic" \
167
+ -r "ok refs/for/main /topic" \
168
168
-r "option old-oid $A" \
169
169
-r "option new-oid $B"
170
170
EOF
171
171
'
172
172
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)
176
176
test_expect_success " proc-receive: report option old-oid and new-oid ($PROTOCOL )" '
177
177
git -C workbench push origin \
178
- HEAD:refs/for/master /topic \
178
+ HEAD:refs/for/main /topic \
179
179
>out 2>&1 &&
180
180
make_user_friendly_and_stable_output <out >actual &&
181
181
cat >expect <<-EOF &&
182
182
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
184
184
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
187
187
remote: proc-receive> option old-oid <COMMIT-A>
188
188
remote: proc-receive> option new-oid <COMMIT-B>
189
189
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
191
191
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
193
193
EOF
194
194
test_cmp expect actual
195
195
'
@@ -201,37 +201,37 @@ test_expect_success "setup proc-receive hook (report with multiple rewrites, $PR
201
201
-r "ok refs/for/a/b/c/topic" \
202
202
-r "ok refs/for/next/topic" \
203
203
-r "option refname refs/pull/123/head" \
204
- -r "ok refs/for/master /topic" \
204
+ -r "ok refs/for/main /topic" \
205
205
-r "option refname refs/pull/124/head" \
206
206
-r "option old-oid $B" \
207
207
-r "option forced-update" \
208
208
-r "option new-oid $A"
209
209
EOF
210
210
'
211
211
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)
215
215
test_expect_success " proc-receive: report with multiple rewrites ($PROTOCOL )" '
216
216
git -C workbench push origin \
217
217
HEAD:refs/for/next/topic \
218
218
HEAD:refs/for/a/b/c/topic \
219
- HEAD:refs/for/master /topic \
219
+ HEAD:refs/for/main /topic \
220
220
>out 2>&1 &&
221
221
make_user_friendly_and_stable_output <out >actual &&
222
222
cat >expect <<-EOF &&
223
223
remote: # pre-receive hook
224
224
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
225
225
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
227
227
remote: # proc-receive hook
228
228
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
229
229
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
231
231
remote: proc-receive> ok refs/for/a/b/c/topic
232
232
remote: proc-receive> ok refs/for/next/topic
233
233
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
235
235
remote: proc-receive> option refname refs/pull/124/head
236
236
remote: proc-receive> option old-oid <COMMIT-B>
237
237
remote: proc-receive> option forced-update
@@ -250,7 +250,7 @@ test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL)" '
250
250
git -C "$upstream" show-ref >out &&
251
251
make_user_friendly_and_stable_output <out >actual &&
252
252
cat >expect <<-EOF &&
253
- <COMMIT-A> refs/heads/master
253
+ <COMMIT-A> refs/heads/main
254
254
EOF
255
255
test_cmp expect actual
256
256
'
0 commit comments