@@ -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)
1313test_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)
4444test_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)
7676test_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)
110110test_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)
143143test_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)
176176test_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)
215215test_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