t5411: adjust the remaining 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/* In the previous commit, we adjusted roughly half of the support files, to stay under the 100kB limit (mails larger than that are rejected by the Git mailing list). 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
a9568dba4177bfe6b75e12a13acd150195e848e0
18 files changed
+355
-355
t/t5411/common-functions.sh
+1
-1
@@ -28,7 +28,7 @@ create_commits_in () {
28
shift ||
29
return 1
30
done &&
31
- git -C "$repo" update-ref refs/heads/master $oid
31
+ git -C "$repo" update-ref refs/heads/main $oid
32
}
33
34
# Format the output of git-push, git-show-ref and other commands to make a
t/t5411/once-0010-report-status-v1.sh
+25
-25
@@ -6,12 +6,12 @@ test_expect_success "setup proc-receive hook" '
6
write_script "$upstream/hooks/proc-receive" <<-EOF
7
printf >&2 "# proc-receive hook\n"
8
test-tool proc-receive -v \
9
- -r "ok refs/for/master/topic1" \
9
+ -r "ok refs/for/main/topic1" \
10
-r "option fall-through" \
11
- -r "ok refs/for/master/topic2" \
11
+ -r "ok refs/for/main/topic2" \
12
-r "option refname refs/for/changes/23/123/1" \
13
-r "option new-oid $A" \
14
- -r "ok refs/for/master/topic2" \
14
+ -r "ok refs/for/main/topic2" \
15
-r "option refname refs/for/changes/24/124/2" \
16
-r "option old-oid $B" \
17
-r "option new-oid $A" \
@@ -20,26 +20,26 @@ test_expect_success "setup proc-receive hook" '
20
EOF
21
'
22
23
-# Refs of upstream : master(A)
24
-# Refs of workbench: master(A) tags/v123
25
-# git push : (B) refs/for/master/topic1(A) foo(A) refs/for/next/topic(A) refs/for/master/topic2(A)
23
+# Refs of upstream : main(A)
24
+# Refs of workbench: main(A) tags/v123
25
+# git push : (B) refs/for/main/topic1(A) foo(A) refs/for/next/topic(A) refs/for/main/topic2(A)
26
test_expect_success "proc-receive: report status v1" '
27
{
28
if test -z "$GIT_DEFAULT_HASH" || test "$GIT_DEFAULT_HASH" = "sha1"
29
then
30
- printf "%s %s refs/heads/master\0report-status\n" \
30
+ printf "%s %s refs/heads/main\0report-status\n" \
31
$A $B | packetize
32
else
33
- printf "%s %s refs/heads/master\0report-status object-format=$GIT_DEFAULT_HASH\n" \
33
+ printf "%s %s refs/heads/main\0report-status object-format=$GIT_DEFAULT_HASH\n" \
34
$A $B | packetize
35
fi &&
36
- printf "%s %s refs/for/master/topic1\n" \
36
+ printf "%s %s refs/for/main/topic1\n" \
37
$ZERO_OID $A | packetize &&
38
printf "%s %s refs/heads/foo\n" \
39
$ZERO_OID $A | packetize &&
40
printf "%s %s refs/for/next/topic\n" \
41
$ZERO_OID $A | packetize &&
42
- printf "%s %s refs/for/master/topic2\n" \
42
+ printf "%s %s refs/for/main/topic2\n" \
43
$ZERO_OID $A | packetize &&
44
printf 0000 &&
45
printf "" | git -C "$upstream" pack-objects --stdout
@@ -48,35 +48,35 @@ test_expect_success "proc-receive: report status v1" '
48
make_user_friendly_and_stable_output <out >actual &&
49
cat >expect <<-EOF &&
50
# pre-receive hook
51
- pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
52
- pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1
51
+ pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
52
+ pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1
53
pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo
54
pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
55
- pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic2
55
+ pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic2
56
# proc-receive hook
57
- proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1
57
+ proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1
58
proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
59
- proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic2
60
- proc-receive> ok refs/for/master/topic1
59
+ proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic2
60
+ proc-receive> ok refs/for/main/topic1
61
proc-receive> option fall-through
62
- proc-receive> ok refs/for/master/topic2
62
+ proc-receive> ok refs/for/main/topic2
63
proc-receive> option refname refs/for/changes/23/123/1
64
proc-receive> option new-oid <COMMIT-A>
65
- proc-receive> ok refs/for/master/topic2
65
+ proc-receive> ok refs/for/main/topic2
66
proc-receive> option refname refs/for/changes/24/124/2
67
proc-receive> option old-oid <COMMIT-B>
68
proc-receive> option new-oid <COMMIT-A>
69
proc-receive> option forced-update
70
proc-receive> ng refs/for/next/topic target branch not exist
71
000eunpack ok
72
- 0019ok refs/heads/master
73
- 001eok refs/for/master/topic1
72
+ 0019ok refs/heads/main
73
+ 001eok refs/for/main/topic1
74
0016ok refs/heads/foo
75
0033ng refs/for/next/topic target branch not exist
76
- 001eok refs/for/master/topic2
76
+ 001eok refs/for/main/topic2
77
0000# post-receive hook
78
- post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
79
- post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic1
78
+ post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
79
+ post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1
80
post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo
81
post-receive< <ZERO-OID> <COMMIT-A> refs/for/changes/23/123/1
82
post-receive< <COMMIT-B> <COMMIT-A> refs/for/changes/24/124/2
@@ -86,9 +86,9 @@ test_expect_success "proc-receive: report status v1" '
86
git -C "$upstream" show-ref >out &&
87
make_user_friendly_and_stable_output <out >actual &&
88
cat >expect <<-EOF &&
89
- <COMMIT-A> refs/for/master/topic1
89
+ <COMMIT-A> refs/for/main/topic1
90
<COMMIT-A> refs/heads/foo
91
- <COMMIT-B> refs/heads/master
91
+ <COMMIT-B> refs/heads/main
92
EOF
93
test_cmp expect actual
94
'
t/t5411/test-0000-standard-git-push.sh
+36
-36
@@ -1,39 +1,39 @@
1
-# Refs of upstream : master(A)
2
-# Refs of workbench: master(A) tags/v123
3
-# git-push : master(B) next(A)
1
+# Refs of upstream : main(A)
2
+# Refs of workbench: main(A) tags/v123
3
+# git-push : main(B) next(A)
4
test_expect_success "git-push ($PROTOCOL)" '
5
git -C workbench push origin \
6
- $B:refs/heads/master \
6
+ $B:refs/heads/main \
7
HEAD:refs/heads/next \
8
>out 2>&1 &&
9
make_user_friendly_and_stable_output <out >actual &&
10
cat >expect <<-EOF &&
11
remote: # pre-receive hook
12
- remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
12
+ remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
13
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
14
remote: # post-receive hook
15
- remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
15
+ remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
16
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
17
To <URL/of/upstream.git>
18
- <OID-A>..<OID-B> <COMMIT-B> -> master
18
+ <OID-A>..<OID-B> <COMMIT-B> -> main
19
* [new branch] HEAD -> next
20
EOF
21
test_cmp expect actual &&
22
git -C "$upstream" show-ref >out &&
23
make_user_friendly_and_stable_output <out >actual &&
24
cat >expect <<-EOF &&
25
- <COMMIT-B> refs/heads/master
25
+ <COMMIT-B> refs/heads/main
26
<COMMIT-A> refs/heads/next
27
EOF
28
test_cmp expect actual
29
'
30
31
-# Refs of upstream : master(B) next(A)
32
-# Refs of workbench: master(A) tags/v123
33
-# git-push --atomic: master(A) next(B)
31
+# Refs of upstream : main(B) next(A)
32
+# Refs of workbench: main(A) tags/v123
33
+# git-push --atomic: main(A) next(B)
34
test_expect_success "git-push --atomic ($PROTOCOL)" '
35
test_must_fail git -C workbench push --atomic origin \
36
- master \
36
+ main \
37
$B:refs/heads/next \
38
>out 2>&1 &&
39
make_user_friendly_and_stable_output <out |
@@ -43,28 +43,28 @@ test_expect_success "git-push --atomic ($PROTOCOL)" '
43
>actual &&
44
cat >expect <<-EOF &&
45
To <URL/of/upstream.git>
46
- ! [rejected] master -> master (non-fast-forward)
46
+ ! [rejected] main -> main (non-fast-forward)
47
! [rejected] <COMMIT-B> -> next (atomic push failed)
48
EOF
49
test_cmp expect actual &&
50
git -C "$upstream" show-ref >out &&
51
make_user_friendly_and_stable_output <out >actual &&
52
cat >expect <<-EOF &&
53
- <COMMIT-B> refs/heads/master
53
+ <COMMIT-B> refs/heads/main
54
<COMMIT-A> refs/heads/next
55
EOF
56
test_cmp expect actual
57
'
58
59
-# Refs of upstream : master(B) next(A)
60
-# Refs of workbench: master(A) tags/v123
61
-# git-push : master(A) next(B)
59
+# Refs of upstream : main(B) next(A)
60
+# Refs of workbench: main(A) tags/v123
61
+# git-push : main(A) next(B)
62
test_expect_success "non-fast-forward git-push ($PROTOCOL)" '
63
test_must_fail git \
64
-C workbench \
65
-c advice.pushUpdateRejected=false \
66
push origin \
67
- master \
67
+ main \
68
$B:refs/heads/next \
69
>out 2>&1 &&
70
make_user_friendly_and_stable_output <out >actual &&
@@ -75,48 +75,48 @@ test_expect_success "non-fast-forward git-push ($PROTOCOL)" '
75
remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/next
76
To <URL/of/upstream.git>
77
<OID-A>..<OID-B> <COMMIT-B> -> next
78
- ! [rejected] master -> master (non-fast-forward)
78
+ ! [rejected] main -> main (non-fast-forward)
79
EOF
80
test_cmp expect actual &&
81
git -C "$upstream" show-ref >out &&
82
make_user_friendly_and_stable_output <out >actual &&
83
cat >expect <<-EOF &&
84
- <COMMIT-B> refs/heads/master
84
+ <COMMIT-B> refs/heads/main
85
<COMMIT-B> refs/heads/next
86
EOF
87
test_cmp expect actual
88
'
89
90
-# Refs of upstream : master(B) next(B)
91
-# Refs of workbench: master(A) tags/v123
92
-# git-push -f : master(A) NULL tags/v123 refs/review/master/topic(A) a/b/c(A)
90
+# Refs of upstream : main(B) next(B)
91
+# Refs of workbench: main(A) tags/v123
92
+# git-push -f : main(A) NULL tags/v123 refs/review/main/topic(A) a/b/c(A)
93
test_expect_success "git-push -f ($PROTOCOL)" '
94
git -C workbench push -f origin \
95
refs/tags/v123 \
96
:refs/heads/next \
97
- master \
98
- master:refs/review/master/topic \
97
+ main \
98
+ main:refs/review/main/topic \
99
HEAD:refs/heads/a/b/c \
100
>out 2>&1 &&
101
make_user_friendly_and_stable_output <out >actual &&
102
cat >expect <<-EOF &&
103
remote: # pre-receive hook
104
- remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
104
+ remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
105
remote: pre-receive< <COMMIT-B> <ZERO-OID> refs/heads/next
106
remote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
107
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic
107
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic
108
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c
109
remote: # post-receive hook
110
- remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
110
+ remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
111
remote: post-receive< <COMMIT-B> <ZERO-OID> refs/heads/next
112
remote: post-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
113
- remote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic
113
+ remote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic
114
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c
115
To <URL/of/upstream.git>
116
- + <OID-B>...<OID-A> master -> master (forced update)
116
+ + <OID-B>...<OID-A> main -> main (forced update)
117
- [deleted] next
118
* [new tag] v123 -> v123
119
- * [new reference] master -> refs/review/master/topic
119
+ * [new reference] main -> refs/review/main/topic
120
* [new branch] HEAD -> a/b/c
121
EOF
122
test_cmp expect actual &&
@@ -124,19 +124,19 @@ test_expect_success "git-push -f ($PROTOCOL)" '
124
make_user_friendly_and_stable_output <out >actual &&
125
cat >expect <<-EOF &&
126
<COMMIT-A> refs/heads/a/b/c
127
- <COMMIT-A> refs/heads/master
128
- <COMMIT-A> refs/review/master/topic
127
+ <COMMIT-A> refs/heads/main
128
+ <COMMIT-A> refs/review/main/topic
129
<TAG-v123> refs/tags/v123
130
EOF
131
test_cmp expect actual
132
'
133
134
-# Refs of upstream : master(A) tags/v123 refs/review/master/topic(A) a/b/c(A)
135
-# Refs of workbench: master(A) tags/v123
134
+# Refs of upstream : main(A) tags/v123 refs/review/main/topic(A) a/b/c(A)
135
+# Refs of workbench: main(A) tags/v123
136
test_expect_success "cleanup ($PROTOCOL)" '
137
(
138
cd "$upstream" &&
139
- git update-ref -d refs/review/master/topic &&
139
+ git update-ref -d refs/review/main/topic &&
140
git update-ref -d refs/tags/v123 &&
141
git update-ref -d refs/heads/a/b/c
142
)
t/t5411/test-0001-standard-git-push--porcelain.sh
+36
-36
@@ -1,21 +1,21 @@
1
-# Refs of upstream : master(A)
2
-# Refs of workbench: master(A) tags/v123
3
-# git-push : master(B) next(A)
1
+# Refs of upstream : main(A)
2
+# Refs of workbench: main(A) tags/v123
3
+# git-push : main(B) next(A)
4
test_expect_success "git-push ($PROTOCOL/porcelain)" '
5
git -C workbench push --porcelain origin \
6
- $B:refs/heads/master \
6
+ $B:refs/heads/main \
7
HEAD:refs/heads/next \
8
>out 2>&1 &&
9
make_user_friendly_and_stable_output <out >actual &&
10
cat >expect <<-EOF &&
11
remote: # pre-receive hook
12
- remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
12
+ remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
13
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
14
remote: # post-receive hook
15
- remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
15
+ remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
16
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
17
To <URL/of/upstream.git>
18
- <COMMIT-B>:refs/heads/master <OID-A>..<OID-B>
18
+ <COMMIT-B>:refs/heads/main <OID-A>..<OID-B>
19
* HEAD:refs/heads/next [new branch]
20
Done
21
EOF
@@ -23,18 +23,18 @@ test_expect_success "git-push ($PROTOCOL/porcelain)" '
23
git -C "$upstream" show-ref >out &&
24
make_user_friendly_and_stable_output <out >actual &&
25
cat >expect <<-EOF &&
26
- <COMMIT-B> refs/heads/master
26
+ <COMMIT-B> refs/heads/main
27
<COMMIT-A> refs/heads/next
28
EOF
29
test_cmp expect actual
30
'
31
32
-# Refs of upstream : master(B) next(A)
33
-# Refs of workbench: master(A) tags/v123
34
-# git-push --atomic: master(A) next(B)
32
+# Refs of upstream : main(B) next(A)
33
+# Refs of workbench: main(A) tags/v123
34
+# git-push --atomic: main(A) next(B)
35
test_expect_success "git-push --atomic ($PROTOCOL/porcelain)" '
36
test_must_fail git -C workbench push --atomic --porcelain origin \
37
- master \
37
+ main \
38
$B:refs/heads/next \
39
>out 2>&1 &&
40
make_user_friendly_and_stable_output <out |
@@ -45,28 +45,28 @@ test_expect_success "git-push --atomic ($PROTOCOL/porcelain)" '
45
>actual &&
46
cat >expect <<-EOF &&
47
To <URL/of/upstream.git>
48
- ! refs/heads/master:refs/heads/master [rejected] (non-fast-forward)
48
+ ! refs/heads/main:refs/heads/main [rejected] (non-fast-forward)
49
! <COMMIT-B>:refs/heads/next [rejected] (atomic push failed)
50
EOF
51
test_cmp expect actual &&
52
git -C "$upstream" show-ref >out &&
53
make_user_friendly_and_stable_output <out >actual &&
54
cat >expect <<-EOF &&
55
- <COMMIT-B> refs/heads/master
55
+ <COMMIT-B> refs/heads/main
56
<COMMIT-A> refs/heads/next
57
EOF
58
test_cmp expect actual
59
'
60
61
-# Refs of upstream : master(B) next(A)
62
-# Refs of workbench: master(A) tags/v123
63
-# git-push : master(A) next(B)
61
+# Refs of upstream : main(B) next(A)
62
+# Refs of workbench: main(A) tags/v123
63
+# git-push : main(A) next(B)
64
test_expect_success "non-fast-forward git-push ($PROTOCOL/porcelain)" '
65
test_must_fail git \
66
-C workbench \
67
-c advice.pushUpdateRejected=false \
68
push --porcelain origin \
69
- master \
69
+ main \
70
$B:refs/heads/next \
71
>out 2>&1 &&
72
make_user_friendly_and_stable_output <out >actual &&
@@ -77,49 +77,49 @@ test_expect_success "non-fast-forward git-push ($PROTOCOL/porcelain)" '
77
remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/next
78
To <URL/of/upstream.git>
79
<COMMIT-B>:refs/heads/next <OID-A>..<OID-B>
80
- ! refs/heads/master:refs/heads/master [rejected] (non-fast-forward)
80
+ ! refs/heads/main:refs/heads/main [rejected] (non-fast-forward)
81
Done
82
EOF
83
test_cmp expect actual &&
84
git -C "$upstream" show-ref >out &&
85
make_user_friendly_and_stable_output <out >actual &&
86
cat >expect <<-EOF &&
87
- <COMMIT-B> refs/heads/master
87
+ <COMMIT-B> refs/heads/main
88
<COMMIT-B> refs/heads/next
89
EOF
90
test_cmp expect actual
91
'
92
93
-# Refs of upstream : master(B) next(B)
94
-# Refs of workbench: master(A) tags/v123
95
-# git-push -f : master(A) NULL tags/v123 refs/review/master/topic(A) a/b/c(A)
93
+# Refs of upstream : main(B) next(B)
94
+# Refs of workbench: main(A) tags/v123
95
+# git-push -f : main(A) NULL tags/v123 refs/review/main/topic(A) a/b/c(A)
96
test_expect_success "git-push -f ($PROTOCOL/porcelain)" '
97
git -C workbench push --porcelain -f origin \
98
refs/tags/v123 \
99
:refs/heads/next \
100
- master \
101
- master:refs/review/master/topic \
100
+ main \
101
+ main:refs/review/main/topic \
102
HEAD:refs/heads/a/b/c \
103
>out 2>&1 &&
104
make_user_friendly_and_stable_output <out >actual &&
105
cat >expect <<-EOF &&
106
remote: # pre-receive hook
107
- remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
107
+ remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
108
remote: pre-receive< <COMMIT-B> <ZERO-OID> refs/heads/next
109
remote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
110
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic
110
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic
111
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c
112
remote: # post-receive hook
113
- remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
113
+ remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
114
remote: post-receive< <COMMIT-B> <ZERO-OID> refs/heads/next
115
remote: post-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
116
- remote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/master/topic
116
+ remote: post-receive< <ZERO-OID> <COMMIT-A> refs/review/main/topic
117
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/a/b/c
118
To <URL/of/upstream.git>
119
- + refs/heads/master:refs/heads/master <OID-B>...<OID-A> (forced update)
119
+ + refs/heads/main:refs/heads/main <OID-B>...<OID-A> (forced update)
120
- :refs/heads/next [deleted]
121
* refs/tags/v123:refs/tags/v123 [new tag]
122
- * refs/heads/master:refs/review/master/topic [new reference]
122
+ * refs/heads/main:refs/review/main/topic [new reference]
123
* HEAD:refs/heads/a/b/c [new branch]
124
Done
125
EOF
@@ -128,19 +128,19 @@ test_expect_success "git-push -f ($PROTOCOL/porcelain)" '
128
make_user_friendly_and_stable_output <out >actual &&
129
cat >expect <<-EOF &&
130
<COMMIT-A> refs/heads/a/b/c
131
- <COMMIT-A> refs/heads/master
132
- <COMMIT-A> refs/review/master/topic
131
+ <COMMIT-A> refs/heads/main
132
+ <COMMIT-A> refs/review/main/topic
133
<TAG-v123> refs/tags/v123
134
EOF
135
test_cmp expect actual
136
'
137
138
-# Refs of upstream : master(A) tags/v123 refs/review/master/topic(A) a/b/c(A)
139
-# Refs of workbench: master(A) tags/v123
138
+# Refs of upstream : main(A) tags/v123 refs/review/main/topic(A) a/b/c(A)
139
+# Refs of workbench: main(A) tags/v123
140
test_expect_success "cleanup ($PROTOCOL/porcelain)" '
141
(
142
cd "$upstream" &&
143
- git update-ref -d refs/review/master/topic &&
143
+ git update-ref -d refs/review/main/topic &&
144
git update-ref -d refs/tags/v123 &&
145
git update-ref -d refs/heads/a/b/c
146
)
t/t5411/test-0002-pre-receive-declined.sh
+6
-6
@@ -5,25 +5,25 @@ test_expect_success "setup pre-receive hook ($PROTOCOL)" '
5
EOF
6
'
7
8
-# Refs of upstream : master(A)
9
-# Refs of workbench: master(A) tags/v123
10
-# git-push : master(B) next(A)
8
+# Refs of upstream : main(A)
9
+# Refs of workbench: main(A) tags/v123
10
+# git-push : main(B) next(A)
11
test_expect_success "git-push is declined ($PROTOCOL)" '
12
test_must_fail git -C workbench push origin \
13
- $B:refs/heads/master \
13
+ $B:refs/heads/main \
14
HEAD:refs/heads/next \
15
>out 2>&1 &&
16
make_user_friendly_and_stable_output <out >actual &&
17
cat >expect <<-EOF &&
18
To <URL/of/upstream.git>
19
- ! [remote rejected] <COMMIT-B> -> master (pre-receive hook declined)
19
+ ! [remote rejected] <COMMIT-B> -> main (pre-receive hook declined)
20
! [remote rejected] HEAD -> next (pre-receive hook declined)
21
EOF
22
test_cmp expect actual &&
23
git -C "$upstream" show-ref >out &&
24
make_user_friendly_and_stable_output <out >actual &&
25
cat >expect <<-EOF &&
26
- <COMMIT-A> refs/heads/master
26
+ <COMMIT-A> refs/heads/main
27
EOF
28
test_cmp expect actual
29
'
t/t5411/test-0003-pre-receive-declined--porcelain.sh
+6
-6
@@ -5,18 +5,18 @@ test_expect_success "setup pre-receive hook ($PROTOCOL/porcelain)" '
5
EOF
6
'
7
8
-# Refs of upstream : master(A)
9
-# Refs of workbench: master(A) tags/v123
10
-# git-push : master(B) next(A)
8
+# Refs of upstream : main(A)
9
+# Refs of workbench: main(A) tags/v123
10
+# git-push : main(B) next(A)
11
test_expect_success "git-push is declined ($PROTOCOL/porcelain)" '
12
test_must_fail git -C workbench push --porcelain origin \
13
- $B:refs/heads/master \
13
+ $B:refs/heads/main \
14
HEAD:refs/heads/next \
15
>out 2>&1 &&
16
make_user_friendly_and_stable_output <out >actual &&
17
cat >expect <<-EOF &&
18
To <URL/of/upstream.git>
19
- ! <COMMIT-B>:refs/heads/master [remote rejected] (pre-receive hook declined)
19
+ ! <COMMIT-B>:refs/heads/main [remote rejected] (pre-receive hook declined)
20
! HEAD:refs/heads/next [remote rejected] (pre-receive hook declined)
21
Done
22
EOF
@@ -24,7 +24,7 @@ test_expect_success "git-push is declined ($PROTOCOL/porcelain)" '
24
git -C "$upstream" show-ref >out &&
25
make_user_friendly_and_stable_output <out >actual &&
26
cat >expect <<-EOF &&
27
- <COMMIT-A> refs/heads/master
27
+ <COMMIT-A> refs/heads/main
28
EOF
29
test_cmp expect actual
30
'
t/t5411/test-0011-no-hook-error.sh
+19
-19
@@ -1,64 +1,64 @@
1
-# Refs of upstream : master(A)
2
-# Refs of workbench: master(A) tags/v123
3
-# git push : next(A) refs/for/master/topic(A)
1
+# Refs of upstream : main(A)
2
+# Refs of workbench: main(A) tags/v123
3
+# git push : next(A) refs/for/main/topic(A)
4
test_expect_success "proc-receive: no hook, fail to push special ref ($PROTOCOL)" '
5
test_must_fail git -C workbench push origin \
6
HEAD:next \
7
- HEAD:refs/for/master/topic \
7
+ HEAD:refs/for/main/topic \
8
>out 2>&1 &&
9
make_user_friendly_and_stable_output <out >actual &&
10
cat >expect <<-EOF &&
11
remote: # pre-receive hook
12
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
13
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
13
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
14
remote: error: cannot find hook "proc-receive"
15
remote: # post-receive hook
16
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
17
To <URL/of/upstream.git>
18
* [new branch] HEAD -> next
19
- ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)
19
+ ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)
20
EOF
21
test_cmp expect actual &&
22
git -C "$upstream" show-ref >out &&
23
make_user_friendly_and_stable_output <out >actual &&
24
cat >expect <<-EOF &&
25
- <COMMIT-A> refs/heads/master
25
+ <COMMIT-A> refs/heads/main
26
<COMMIT-A> refs/heads/next
27
EOF
28
test_cmp expect actual
29
'
30
31
-# Refs of upstream : master(A) next(A)
32
-# Refs of workbench: master(A) tags/v123
31
+# Refs of upstream : main(A) next(A)
32
+# Refs of workbench: main(A) tags/v123
33
test_expect_success "cleanup ($PROTOCOL)" '
34
git -C "$upstream" update-ref -d refs/heads/next
35
'
36
37
-# Refs of upstream : master(A)
38
-# Refs of workbench: master(A) tags/v123
39
-# git push --atomic: (B) next(A) refs/for/master/topic(A)
37
+# Refs of upstream : main(A)
38
+# Refs of workbench: main(A) tags/v123
39
+# git push --atomic: (B) next(A) refs/for/main/topic(A)
40
test_expect_success "proc-receive: no hook, all failed for atomic push ($PROTOCOL)" '
41
test_must_fail git -C workbench push --atomic origin \
42
- $B:master \
42
+ $B:main \
43
HEAD:next \
44
- HEAD:refs/for/master/topic >out 2>&1 &&
44
+ HEAD:refs/for/main/topic >out 2>&1 &&
45
make_user_friendly_and_stable_output <out >actual &&
46
cat >expect <<-EOF &&
47
remote: # pre-receive hook
48
- remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
48
+ remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
49
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
50
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
50
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
51
remote: error: cannot find hook "proc-receive"
52
To <URL/of/upstream.git>
53
- ! [remote rejected] <COMMIT-B> -> master (fail to run proc-receive hook)
53
+ ! [remote rejected] <COMMIT-B> -> main (fail to run proc-receive hook)
54
! [remote rejected] HEAD -> next (fail to run proc-receive hook)
55
- ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)
55
+ ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)
56
EOF
57
test_cmp expect actual &&
58
git -C "$upstream" show-ref >out &&
59
make_user_friendly_and_stable_output <out >actual &&
60
cat >expect <<-EOF &&
61
- <COMMIT-A> refs/heads/master
61
+ <COMMIT-A> refs/heads/main
62
EOF
63
test_cmp expect actual
64
'
t/t5411/test-0012-no-hook-error--porcelain.sh
+19
-19
@@ -1,66 +1,66 @@
1
-# Refs of upstream : master(A)
2
-# Refs of workbench: master(A) tags/v123
3
-# git push : next(A) refs/for/master/topic(A)
1
+# Refs of upstream : main(A)
2
+# Refs of workbench: main(A) tags/v123
3
+# git push : next(A) refs/for/main/topic(A)
4
test_expect_success "proc-receive: no hook, fail to push special ref ($PROTOCOL/porcelain)" '
5
test_must_fail git -C workbench push --porcelain origin \
6
HEAD:next \
7
- HEAD:refs/for/master/topic \
7
+ HEAD:refs/for/main/topic \
8
>out 2>&1 &&
9
make_user_friendly_and_stable_output <out >actual &&
10
cat >expect <<-EOF &&
11
remote: # pre-receive hook
12
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
13
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
13
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
14
remote: error: cannot find hook "proc-receive"
15
remote: # post-receive hook
16
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
17
To <URL/of/upstream.git>
18
* HEAD:refs/heads/next [new branch]
19
- ! HEAD:refs/for/master/topic [remote rejected] (fail to run proc-receive hook)
19
+ ! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
20
Done
21
EOF
22
test_cmp expect actual &&
23
git -C "$upstream" show-ref >out &&
24
make_user_friendly_and_stable_output <out >actual &&
25
cat >expect <<-EOF &&
26
- <COMMIT-A> refs/heads/master
26
+ <COMMIT-A> refs/heads/main
27
<COMMIT-A> refs/heads/next
28
EOF
29
test_cmp expect actual
30
'
31
32
-# Refs of upstream : master(A) next(A)
33
-# Refs of workbench: master(A) tags/v123
32
+# Refs of upstream : main(A) next(A)
33
+# Refs of workbench: main(A) tags/v123
34
test_expect_success "cleanup ($PROTOCOL/porcelain)" '
35
git -C "$upstream" update-ref -d refs/heads/next
36
'
37
38
-# Refs of upstream : master(A)
39
-# Refs of workbench: master(A) tags/v123
40
-# git push --atomic: (B) next(A) refs/for/master/topic(A)
38
+# Refs of upstream : main(A)
39
+# Refs of workbench: main(A) tags/v123
40
+# git push --atomic: (B) next(A) refs/for/main/topic(A)
41
test_expect_success "proc-receive: no hook, all failed for atomic push ($PROTOCOL/porcelain)" '
42
test_must_fail git -C workbench push --porcelain --atomic origin \
43
- $B:master \
43
+ $B:main \
44
HEAD:next \
45
- HEAD:refs/for/master/topic >out 2>&1 &&
45
+ HEAD:refs/for/main/topic >out 2>&1 &&
46
make_user_friendly_and_stable_output <out >actual &&
47
cat >expect <<-EOF &&
48
remote: # pre-receive hook
49
- remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
49
+ remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
50
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
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
remote: error: cannot find hook "proc-receive"
53
To <URL/of/upstream.git>
54
- ! <COMMIT-B>:refs/heads/master [remote rejected] (fail to run proc-receive hook)
54
+ ! <COMMIT-B>:refs/heads/main [remote rejected] (fail to run proc-receive hook)
55
! HEAD:refs/heads/next [remote rejected] (fail to run proc-receive hook)
56
- ! HEAD:refs/for/master/topic [remote rejected] (fail to run proc-receive hook)
56
+ ! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
57
Done
58
EOF
59
test_cmp expect actual &&
60
git -C "$upstream" show-ref >out &&
61
make_user_friendly_and_stable_output <out >actual &&
62
cat >expect <<-EOF &&
63
- <COMMIT-A> refs/heads/master
63
+ <COMMIT-A> refs/heads/main
64
EOF
65
test_cmp expect actual
66
'
t/t5411/test-0013-bad-protocol.sh
+48
-48
@@ -5,12 +5,12 @@ test_expect_success "setup proc-receive hook (unknown version, $PROTOCOL)" '
5
EOF
6
'
7
8
-# Refs of upstream : master(A)
9
-# Refs of workbench: master(A) tags/v123
10
-# git push : refs/for/master/topic(A)
8
+# Refs of upstream : main(A)
9
+# Refs of workbench: main(A) tags/v123
10
+# git push : refs/for/main/topic(A)
11
test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL)" '
12
test_must_fail git -C workbench push origin \
13
- HEAD:refs/for/master/topic \
13
+ HEAD:refs/for/main/topic \
14
>out 2>&1 &&
15
make_user_friendly_and_stable_output <out >actual &&
16
@@ -20,7 +20,7 @@ test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL)" '
20
<actual >actual-report &&
21
cat >expect <<-EOF &&
22
To <URL/of/upstream.git>
23
- ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)
23
+ ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)
24
EOF
25
test_cmp expect actual-report &&
26
@@ -36,7 +36,7 @@ test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL)" '
36
git -C "$upstream" show-ref >out &&
37
make_user_friendly_and_stable_output <out >actual &&
38
cat >expect <<-EOF &&
39
- <COMMIT-A> refs/heads/master
39
+ <COMMIT-A> refs/heads/main
40
EOF
41
test_cmp expect actual
42
'
@@ -48,30 +48,30 @@ test_expect_success "setup proc-receive hook (hook --die-version, $PROTOCOL)" '
48
EOF
49
'
50
51
-# Refs of upstream : master(A)
52
-# Refs of workbench: master(A) tags/v123
53
-# git push : refs/for/master/topic(A)
51
+# Refs of upstream : main(A)
52
+# Refs of workbench: main(A) tags/v123
53
+# git push : refs/for/main/topic(A)
54
test_expect_success "proc-receive: bad protocol (hook --die-version, $PROTOCOL)" '
55
test_must_fail git -C workbench push origin \
56
- HEAD:refs/for/master/topic \
56
+ HEAD:refs/for/main/topic \
57
>out 2>&1 &&
58
make_user_friendly_and_stable_output <out >actual &&
59
60
cat >expect <<-EOF &&
61
remote: # pre-receive hook
62
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
62
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
63
remote: # proc-receive hook
64
remote: fatal: bad protocol version: 1
65
remote: error: proc-receive version "0" is not supported
66
To <URL/of/upstream.git>
67
- ! [remote rejected] HEAD -> refs/for/master/topic (fail to run proc-receive hook)
67
+ ! [remote rejected] HEAD -> refs/for/main/topic (fail to run proc-receive hook)
68
EOF
69
test_cmp expect actual &&
70
71
git -C "$upstream" show-ref >out &&
72
make_user_friendly_and_stable_output <out >actual &&
73
cat >expect <<-EOF &&
74
- <COMMIT-A> refs/heads/master
74
+ <COMMIT-A> refs/heads/main
75
EOF
76
test_cmp expect actual
77
'
@@ -83,21 +83,21 @@ test_expect_success "setup proc-receive hook (hook --die-readline, $PROTOCOL)" '
83
EOF
84
'
85
86
-# Refs of upstream : master(A)
87
-# Refs of workbench: master(A) tags/v123
88
-# git push : refs/for/master/topic(A)
86
+# Refs of upstream : main(A)
87
+# Refs of workbench: main(A) tags/v123
88
+# git push : refs/for/main/topic(A)
89
test_expect_success "proc-receive: bad protocol (hook --die-readline, $PROTOCOL)" '
90
test_must_fail git -C workbench push origin \
91
- HEAD:refs/for/master/topic \
91
+ HEAD:refs/for/main/topic \
92
>out 2>&1 &&
93
make_user_friendly_and_stable_output <out >actual &&
94
95
- grep "remote: fatal: protocol error: expected \"old new ref\", got \"<ZERO-OID> <COMMIT-A> refs/for/master/topic\"" actual &&
95
+ grep "remote: fatal: protocol error: expected \"old new ref\", got \"<ZERO-OID> <COMMIT-A> refs/for/main/topic\"" actual &&
96
97
git -C "$upstream" show-ref >out &&
98
make_user_friendly_and_stable_output <out >actual &&
99
cat >expect <<-EOF &&
100
- <COMMIT-A> refs/heads/master
100
+ <COMMIT-A> refs/heads/main
101
EOF
102
test_cmp expect actual
103
'
@@ -109,38 +109,38 @@ test_expect_success "setup proc-receive hook (no report, $PROTOCOL)" '
109
EOF
110
'
111
112
-# Refs of upstream : master(A)
113
-# Refs of workbench: master(A) tags/v123
114
-# git push : next(A) refs/for/master/topic(A)
112
+# Refs of upstream : main(A)
113
+# Refs of workbench: main(A) tags/v123
114
+# git push : next(A) refs/for/main/topic(A)
115
test_expect_success "proc-receive: bad protocol (no report, $PROTOCOL)" '
116
test_must_fail git -C workbench push origin \
117
HEAD:refs/heads/next \
118
- HEAD:refs/for/master/topic >out 2>&1 &&
118
+ HEAD:refs/for/main/topic >out 2>&1 &&
119
make_user_friendly_and_stable_output <out >actual &&
120
cat >expect <<-EOF &&
121
remote: # pre-receive hook
122
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
123
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
123
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
124
remote: # proc-receive hook
125
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
125
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
126
remote: # post-receive hook
127
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
128
To <URL/of/upstream.git>
129
* [new branch] HEAD -> next
130
- ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)
130
+ ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
131
EOF
132
test_cmp expect actual &&
133
git -C "$upstream" show-ref >out &&
134
make_user_friendly_and_stable_output <out >actual &&
135
cat >expect <<-EOF &&
136
- <COMMIT-A> refs/heads/master
136
+ <COMMIT-A> refs/heads/main
137
<COMMIT-A> refs/heads/next
138
EOF
139
test_cmp expect actual
140
'
141
142
-# Refs of upstream : master(A) next(A)
143
-# Refs of workbench: master(A) tags/v123
142
+# Refs of upstream : main(A) next(A)
143
+# Refs of workbench: main(A) tags/v123
144
test_expect_success "cleanup ($PROTOCOL)" '
145
git -C "$upstream" update-ref -d refs/heads/next
146
@@ -154,29 +154,29 @@ test_expect_success "setup proc-receive hook (no ref, $PROTOCOL)" '
154
EOF
155
'
156
157
-# Refs of upstream : master(A)
158
-# Refs of workbench: master(A) tags/v123
159
-# git push : refs/for/master/topic
157
+# Refs of upstream : main(A)
158
+# Refs of workbench: main(A) tags/v123
159
+# git push : refs/for/main/topic
160
test_expect_success "proc-receive: bad protocol (no ref, $PROTOCOL)" '
161
test_must_fail git -C workbench push origin \
162
- HEAD:refs/for/master/topic\
162
+ HEAD:refs/for/main/topic\
163
>out 2>&1 &&
164
make_user_friendly_and_stable_output <out >actual &&
165
cat >expect <<-EOF &&
166
remote: # pre-receive hook
167
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
167
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
168
remote: # proc-receive hook
169
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
169
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
170
remote: proc-receive> ok
171
remote: error: proc-receive reported incomplete status line: "ok"
172
To <URL/of/upstream.git>
173
- ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)
173
+ ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
174
EOF
175
test_cmp expect actual &&
176
git -C "$upstream" show-ref >out &&
177
make_user_friendly_and_stable_output <out >actual &&
178
cat >expect <<-EOF &&
179
- <COMMIT-A> refs/heads/master
179
+ <COMMIT-A> refs/heads/main
180
EOF
181
test_cmp expect actual
182
'
@@ -185,33 +185,33 @@ test_expect_success "setup proc-receive hook (unknown status, $PROTOCOL)" '
185
write_script "$upstream/hooks/proc-receive" <<-EOF
186
printf >&2 "# proc-receive hook\n"
187
test-tool proc-receive -v \
188
- -r "xx refs/for/master/topic"
188
+ -r "xx refs/for/main/topic"
189
EOF
190
'
191
192
-# Refs of upstream : master(A)
193
-# Refs of workbench: master(A) tags/v123
194
-# git push : refs/for/master/topic
192
+# Refs of upstream : main(A)
193
+# Refs of workbench: main(A) tags/v123
194
+# git push : refs/for/main/topic
195
test_expect_success "proc-receive: bad protocol (unknown status, $PROTOCOL)" '
196
test_must_fail git -C workbench push origin \
197
- HEAD:refs/for/master/topic \
197
+ HEAD:refs/for/main/topic \
198
>out 2>&1 &&
199
make_user_friendly_and_stable_output <out >actual &&
200
cat >expect <<-EOF &&
201
remote: # pre-receive hook
202
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
202
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
203
remote: # proc-receive hook
204
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
205
- remote: proc-receive> xx refs/for/master/topic
206
- remote: error: proc-receive reported bad status "xx" on ref "refs/for/master/topic"
204
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
205
+ remote: proc-receive> xx refs/for/main/topic
206
+ remote: error: proc-receive reported bad status "xx" on ref "refs/for/main/topic"
207
To <URL/of/upstream.git>
208
- ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)
208
+ ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
209
EOF
210
test_cmp expect actual &&
211
git -C "$upstream" show-ref >out &&
212
make_user_friendly_and_stable_output <out >actual &&
213
cat >expect <<-EOF &&
214
- <COMMIT-A> refs/heads/master
214
+ <COMMIT-A> refs/heads/main
215
EOF
216
test_cmp expect actual
217
'
t/t5411/test-0014-bad-protocol--porcelain.sh
+35
-35
@@ -5,12 +5,12 @@ test_expect_success "setup proc-receive hook (unknown version, $PROTOCOL/porcela
5
EOF
6
'
7
8
-# Refs of upstream : master(A)
9
-# Refs of workbench: master(A) tags/v123
10
-# git push : refs/for/master/topic(A)
8
+# Refs of upstream : main(A)
9
+# Refs of workbench: main(A) tags/v123
10
+# git push : refs/for/main/topic(A)
11
test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL/porcelain)" '
12
test_must_fail git -C workbench push --porcelain origin \
13
- HEAD:refs/for/master/topic \
13
+ HEAD:refs/for/main/topic \
14
>out 2>&1 &&
15
make_user_friendly_and_stable_output <out >actual &&
16
@@ -20,7 +20,7 @@ test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL/porc
20
<actual >actual-report &&
21
cat >expect <<-EOF &&
22
To <URL/of/upstream.git>
23
- ! HEAD:refs/for/master/topic [remote rejected] (fail to run proc-receive hook)
23
+ ! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
24
Done
25
EOF
26
test_cmp expect actual-report &&
@@ -37,7 +37,7 @@ test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL/porc
37
git -C "$upstream" show-ref >out &&
38
make_user_friendly_and_stable_output <out >actual &&
39
cat >expect <<-EOF &&
40
- <COMMIT-A> refs/heads/master
40
+ <COMMIT-A> refs/heads/main
41
EOF
42
test_cmp expect actual
43
'
@@ -49,39 +49,39 @@ test_expect_success "setup proc-receive hook (no report, $PROTOCOL/porcelain)" '
49
EOF
50
'
51
52
-# Refs of upstream : master(A)
53
-# Refs of workbench: master(A) tags/v123
54
-# git push : next(A) refs/for/master/topic(A)
52
+# Refs of upstream : main(A)
53
+# Refs of workbench: main(A) tags/v123
54
+# git push : next(A) refs/for/main/topic(A)
55
test_expect_success "proc-receive: bad protocol (no report, $PROTOCOL/porcelain)" '
56
test_must_fail git -C workbench push --porcelain origin \
57
HEAD:refs/heads/next \
58
- HEAD:refs/for/master/topic >out 2>&1 &&
58
+ HEAD:refs/for/main/topic >out 2>&1 &&
59
make_user_friendly_and_stable_output <out >actual &&
60
cat >expect <<-EOF &&
61
remote: # pre-receive hook
62
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
63
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
63
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
64
remote: # proc-receive hook
65
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
65
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
66
remote: # post-receive hook
67
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
68
To <URL/of/upstream.git>
69
* HEAD:refs/heads/next [new branch]
70
- ! HEAD:refs/for/master/topic [remote rejected] (proc-receive failed to report status)
70
+ ! HEAD:refs/for/main/topic [remote rejected] (proc-receive failed to report status)
71
Done
72
EOF
73
test_cmp expect actual &&
74
git -C "$upstream" show-ref >out &&
75
make_user_friendly_and_stable_output <out >actual &&
76
cat >expect <<-EOF &&
77
- <COMMIT-A> refs/heads/master
77
+ <COMMIT-A> refs/heads/main
78
<COMMIT-A> refs/heads/next
79
EOF
80
test_cmp expect actual
81
'
82
83
-# Refs of upstream : master(A) next(A)
84
-# Refs of workbench: master(A) tags/v123
83
+# Refs of upstream : main(A) next(A)
84
+# Refs of workbench: main(A) tags/v123
85
test_expect_success "cleanup ($PROTOCOL/porcelain)" '
86
git -C "$upstream" update-ref -d refs/heads/next
87
@@ -95,30 +95,30 @@ test_expect_success "setup proc-receive hook (no ref, $PROTOCOL/porcelain)" '
95
EOF
96
'
97
98
-# Refs of upstream : master(A)
99
-# Refs of workbench: master(A) tags/v123
100
-# git push : refs/for/master/topic
98
+# Refs of upstream : main(A)
99
+# Refs of workbench: main(A) tags/v123
100
+# git push : refs/for/main/topic
101
test_expect_success "proc-receive: bad protocol (no ref, $PROTOCOL/porcelain)" '
102
test_must_fail git -C workbench push --porcelain origin \
103
- HEAD:refs/for/master/topic\
103
+ HEAD:refs/for/main/topic\
104
>out 2>&1 &&
105
make_user_friendly_and_stable_output <out >actual &&
106
cat >expect <<-EOF &&
107
remote: # pre-receive hook
108
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
108
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
109
remote: # proc-receive hook
110
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
110
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
111
remote: proc-receive> ok
112
remote: error: proc-receive reported incomplete status line: "ok"
113
To <URL/of/upstream.git>
114
- ! HEAD:refs/for/master/topic [remote rejected] (proc-receive failed to report status)
114
+ ! HEAD:refs/for/main/topic [remote rejected] (proc-receive failed to report status)
115
Done
116
EOF
117
test_cmp expect actual &&
118
git -C "$upstream" show-ref >out &&
119
make_user_friendly_and_stable_output <out >actual &&
120
cat >expect <<-EOF &&
121
- <COMMIT-A> refs/heads/master
121
+ <COMMIT-A> refs/heads/main
122
EOF
123
test_cmp expect actual
124
'
@@ -127,34 +127,34 @@ test_expect_success "setup proc-receive hook (unknown status, $PROTOCOL/porcelai
127
write_script "$upstream/hooks/proc-receive" <<-EOF
128
printf >&2 "# proc-receive hook\n"
129
test-tool proc-receive -v \
130
- -r "xx refs/for/master/topic"
130
+ -r "xx refs/for/main/topic"
131
EOF
132
'
133
134
-# Refs of upstream : master(A)
135
-# Refs of workbench: master(A) tags/v123
136
-# git push : refs/for/master/topic
134
+# Refs of upstream : main(A)
135
+# Refs of workbench: main(A) tags/v123
136
+# git push : refs/for/main/topic
137
test_expect_success "proc-receive: bad protocol (unknown status, $PROTOCOL/porcelain)" '
138
test_must_fail git -C workbench push --porcelain origin \
139
- HEAD:refs/for/master/topic \
139
+ HEAD:refs/for/main/topic \
140
>out 2>&1 &&
141
make_user_friendly_and_stable_output <out >actual &&
142
cat >expect <<-EOF &&
143
remote: # pre-receive hook
144
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
144
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
145
remote: # proc-receive hook
146
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
147
- remote: proc-receive> xx refs/for/master/topic
148
- remote: error: proc-receive reported bad status "xx" on ref "refs/for/master/topic"
146
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
147
+ remote: proc-receive> xx refs/for/main/topic
148
+ remote: error: proc-receive reported bad status "xx" on ref "refs/for/main/topic"
149
To <URL/of/upstream.git>
150
- ! HEAD:refs/for/master/topic [remote rejected] (proc-receive failed to report status)
150
+ ! HEAD:refs/for/main/topic [remote rejected] (proc-receive failed to report status)
151
Done
152
EOF
153
test_cmp expect actual &&
154
git -C "$upstream" show-ref >out &&
155
make_user_friendly_and_stable_output <out >actual &&
156
cat >expect <<-EOF &&
157
- <COMMIT-A> refs/heads/master
157
+ <COMMIT-A> refs/heads/main
158
EOF
159
test_cmp expect actual
160
'
t/t5411/test-0020-report-ng.sh
+20
-20
@@ -2,32 +2,32 @@ test_expect_success "setup proc-receive hook (ng, no message, $PROTOCOL)" '
2
write_script "$upstream/hooks/proc-receive" <<-EOF
3
printf >&2 "# proc-receive hook\n"
4
test-tool proc-receive -v \
5
- -r "ng refs/for/master/topic"
5
+ -r "ng refs/for/main/topic"
6
EOF
7
'
8
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
12
test_expect_success "proc-receive: fail to update (ng, no message, $PROTOCOL)" '
13
test_must_fail git -C workbench push origin \
14
- HEAD:refs/for/master/topic \
14
+ HEAD:refs/for/main/topic \
15
>out 2>&1 &&
16
make_user_friendly_and_stable_output <out >actual &&
17
cat >expect <<-EOF &&
18
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
20
remote: # proc-receive hook
21
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
22
- remote: proc-receive> ng refs/for/master/topic
21
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
22
+ remote: proc-receive> ng refs/for/main/topic
23
To <URL/of/upstream.git>
24
- ! [remote rejected] HEAD -> refs/for/master/topic (failed)
24
+ ! [remote rejected] HEAD -> refs/for/main/topic (failed)
25
EOF
26
test_cmp expect actual &&
27
git -C "$upstream" show-ref >out &&
28
make_user_friendly_and_stable_output <out >actual &&
29
cat >expect <<-EOF &&
30
- <COMMIT-A> refs/heads/master
30
+ <COMMIT-A> refs/heads/main
31
EOF
32
test_cmp expect actual
33
'
@@ -36,32 +36,32 @@ test_expect_success "setup proc-receive hook (ng message, $PROTOCOL)" '
36
write_script "$upstream/hooks/proc-receive" <<-EOF
37
printf >&2 "# proc-receive hook\n"
38
test-tool proc-receive -v \
39
- -r "ng refs/for/master/topic error msg"
39
+ -r "ng refs/for/main/topic error msg"
40
EOF
41
'
42
43
-# Refs of upstream : master(A)
44
-# Refs of workbench: master(A) tags/v123
45
-# git push : refs/for/master/topic
43
+# Refs of upstream : main(A)
44
+# Refs of workbench: main(A) tags/v123
45
+# git push : refs/for/main/topic
46
test_expect_success "proc-receive: fail to update (ng, with message, $PROTOCOL)" '
47
test_must_fail git -C workbench push origin \
48
- HEAD:refs/for/master/topic \
48
+ HEAD:refs/for/main/topic \
49
>out 2>&1 &&
50
make_user_friendly_and_stable_output <out >actual &&
51
cat >expect <<-EOF &&
52
remote: # pre-receive hook
53
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
53
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
54
remote: # proc-receive hook
55
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
56
- remote: proc-receive> ng refs/for/master/topic error msg
55
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
56
+ remote: proc-receive> ng refs/for/main/topic error msg
57
To <URL/of/upstream.git>
58
- ! [remote rejected] HEAD -> refs/for/master/topic (error msg)
58
+ ! [remote rejected] HEAD -> refs/for/main/topic (error msg)
59
EOF
60
test_cmp expect actual &&
61
git -C "$upstream" show-ref >out &&
62
make_user_friendly_and_stable_output <out >actual &&
63
cat >expect <<-EOF &&
64
- <COMMIT-A> refs/heads/master
64
+ <COMMIT-A> refs/heads/main
65
EOF
66
test_cmp expect actual
67
'
t/t5411/test-0021-report-ng--porcelain.sh
+20
-20
@@ -2,33 +2,33 @@ test_expect_success "setup proc-receive hook (ng, no message, $PROTOCOL/porcelai
2
write_script "$upstream/hooks/proc-receive" <<-EOF
3
printf >&2 "# proc-receive hook\n"
4
test-tool proc-receive -v \
5
- -r "ng refs/for/master/topic"
5
+ -r "ng refs/for/main/topic"
6
EOF
7
'
8
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
12
test_expect_success "proc-receive: fail to update (ng, no message, $PROTOCOL/porcelain)" '
13
test_must_fail git -C workbench push --porcelain origin \
14
- HEAD:refs/for/master/topic \
14
+ HEAD:refs/for/main/topic \
15
>out 2>&1 &&
16
make_user_friendly_and_stable_output <out >actual &&
17
cat >expect <<-EOF &&
18
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
20
remote: # proc-receive hook
21
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
22
- remote: proc-receive> ng refs/for/master/topic
21
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
22
+ remote: proc-receive> ng refs/for/main/topic
23
To <URL/of/upstream.git>
24
- ! HEAD:refs/for/master/topic [remote rejected] (failed)
24
+ ! HEAD:refs/for/main/topic [remote rejected] (failed)
25
Done
26
EOF
27
test_cmp expect actual &&
28
git -C "$upstream" show-ref >out &&
29
make_user_friendly_and_stable_output <out >actual &&
30
cat >expect <<-EOF &&
31
- <COMMIT-A> refs/heads/master
31
+ <COMMIT-A> refs/heads/main
32
EOF
33
test_cmp expect actual
34
'
@@ -37,33 +37,33 @@ test_expect_success "setup proc-receive hook (ng message, $PROTOCOL/porcelain)"
37
write_script "$upstream/hooks/proc-receive" <<-EOF
38
printf >&2 "# proc-receive hook\n"
39
test-tool proc-receive -v \
40
- -r "ng refs/for/master/topic error msg"
40
+ -r "ng refs/for/main/topic error msg"
41
EOF
42
'
43
44
-# Refs of upstream : master(A)
45
-# Refs of workbench: master(A) tags/v123
46
-# git push : refs/for/master/topic
44
+# Refs of upstream : main(A)
45
+# Refs of workbench: main(A) tags/v123
46
+# git push : refs/for/main/topic
47
test_expect_success "proc-receive: fail to update (ng, with message, $PROTOCOL/porcelain)" '
48
test_must_fail git -C workbench push --porcelain origin \
49
- HEAD:refs/for/master/topic \
49
+ HEAD:refs/for/main/topic \
50
>out 2>&1 &&
51
make_user_friendly_and_stable_output <out >actual &&
52
cat >expect <<-EOF &&
53
remote: # pre-receive hook
54
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
54
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
55
remote: # proc-receive hook
56
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
57
- remote: proc-receive> ng refs/for/master/topic error msg
56
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
57
+ remote: proc-receive> ng refs/for/main/topic error msg
58
To <URL/of/upstream.git>
59
- ! HEAD:refs/for/master/topic [remote rejected] (error msg)
59
+ ! HEAD:refs/for/main/topic [remote rejected] (error msg)
60
Done
61
EOF
62
test_cmp expect actual &&
63
git -C "$upstream" show-ref >out &&
64
make_user_friendly_and_stable_output <out >actual &&
65
cat >expect <<-EOF &&
66
- <COMMIT-A> refs/heads/master
66
+ <COMMIT-A> refs/heads/main
67
EOF
68
test_cmp expect actual
69
'
t/t5411/test-0022-report-unexpect-ref.sh
+18
-18
@@ -2,44 +2,44 @@ test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL)" '
2
write_script "$upstream/hooks/proc-receive" <<-EOF
3
printf >&2 "# proc-receive hook\n"
4
test-tool proc-receive -v \
5
- -r "ok refs/heads/master"
5
+ -r "ok refs/heads/main"
6
EOF
7
'
8
9
-# Refs of upstream : master(A)
10
-# Refs of workbench: master(A) tags/v123
11
-# git push : (B) refs/for/master/topic
9
+# Refs of upstream : main(A)
10
+# Refs of workbench: main(A) tags/v123
11
+# git push : (B) refs/for/main/topic
12
test_expect_success "proc-receive: report unexpected ref ($PROTOCOL)" '
13
test_must_fail git -C workbench push origin \
14
- $B:refs/heads/master \
15
- HEAD:refs/for/master/topic \
14
+ $B:refs/heads/main \
15
+ HEAD:refs/for/main/topic \
16
>out 2>&1 &&
17
make_user_friendly_and_stable_output <out >actual &&
18
cat >expect <<-EOF &&
19
remote: # pre-receive hook
20
- remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
21
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
20
+ remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
21
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
22
remote: # proc-receive hook
23
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
24
- remote: proc-receive> ok refs/heads/master
25
- remote: error: proc-receive reported status on unexpected ref: refs/heads/master
23
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
24
+ remote: proc-receive> ok refs/heads/main
25
+ remote: error: proc-receive reported status on unexpected ref: refs/heads/main
26
remote: # post-receive hook
27
- remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
27
+ remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
28
To <URL/of/upstream.git>
29
- <OID-A>..<OID-B> <COMMIT-B> -> master
30
- ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)
29
+ <OID-A>..<OID-B> <COMMIT-B> -> main
30
+ ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
31
EOF
32
test_cmp expect actual &&
33
git -C "$upstream" show-ref >out &&
34
make_user_friendly_and_stable_output <out >actual &&
35
cat >expect <<-EOF &&
36
- <COMMIT-B> refs/heads/master
36
+ <COMMIT-B> refs/heads/main
37
EOF
38
test_cmp expect actual
39
'
40
41
-# Refs of upstream : master(B)
42
-# Refs of workbench: master(A) tags/v123
41
+# Refs of upstream : main(B)
42
+# Refs of workbench: main(A) tags/v123
43
test_expect_success "cleanup ($PROTOCOL)" '
44
- git -C "$upstream" update-ref refs/heads/master $A
44
+ git -C "$upstream" update-ref refs/heads/main $A
45
'
t/t5411/test-0023-report-unexpect-ref--porcelain.sh
+18
-18
@@ -2,45 +2,45 @@ test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL/porcelai
2
write_script "$upstream/hooks/proc-receive" <<-EOF
3
printf >&2 "# proc-receive hook\n"
4
test-tool proc-receive -v \
5
- -r "ok refs/heads/master"
5
+ -r "ok refs/heads/main"
6
EOF
7
'
8
9
-# Refs of upstream : master(A)
10
-# Refs of workbench: master(A) tags/v123
11
-# git push : (B) refs/for/master/topic
9
+# Refs of upstream : main(A)
10
+# Refs of workbench: main(A) tags/v123
11
+# git push : (B) refs/for/main/topic
12
test_expect_success "proc-receive: report unexpected ref ($PROTOCOL/porcelain)" '
13
test_must_fail git -C workbench push --porcelain origin \
14
- $B:refs/heads/master \
15
- HEAD:refs/for/master/topic \
14
+ $B:refs/heads/main \
15
+ HEAD:refs/for/main/topic \
16
>out 2>&1 &&
17
make_user_friendly_and_stable_output <out >actual &&
18
cat >expect <<-EOF &&
19
remote: # pre-receive hook
20
- remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
21
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
20
+ remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
21
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
22
remote: # proc-receive hook
23
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
24
- remote: proc-receive> ok refs/heads/master
25
- remote: error: proc-receive reported status on unexpected ref: refs/heads/master
23
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
24
+ remote: proc-receive> ok refs/heads/main
25
+ remote: error: proc-receive reported status on unexpected ref: refs/heads/main
26
remote: # post-receive hook
27
- remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
27
+ remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
28
To <URL/of/upstream.git>
29
- <COMMIT-B>:refs/heads/master <OID-A>..<OID-B>
30
- ! HEAD:refs/for/master/topic [remote rejected] (proc-receive failed to report status)
29
+ <COMMIT-B>:refs/heads/main <OID-A>..<OID-B>
30
+ ! HEAD:refs/for/main/topic [remote rejected] (proc-receive failed to report status)
31
Done
32
EOF
33
test_cmp expect actual &&
34
git -C "$upstream" show-ref >out &&
35
make_user_friendly_and_stable_output <out >actual &&
36
cat >expect <<-EOF &&
37
- <COMMIT-B> refs/heads/master
37
+ <COMMIT-B> refs/heads/main
38
EOF
39
test_cmp expect actual
40
'
41
42
-# Refs of upstream : master(B)
43
-# Refs of workbench: master(A) tags/v123
42
+# Refs of upstream : main(B)
43
+# Refs of workbench: main(A) tags/v123
44
test_expect_success "cleanup ($PROTOCOL/porcelain)" '
45
- git -C "$upstream" update-ref refs/heads/master $A
45
+ git -C "$upstream" update-ref refs/heads/main $A
46
'
t/t5411/test-0024-report-unknown-ref.sh
+6
-6
@@ -2,12 +2,12 @@ test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL)" '
2
write_script "$upstream/hooks/proc-receive" <<-EOF
3
printf >&2 "# proc-receive hook\n"
4
test-tool proc-receive -v \
5
- -r "ok refs/for/master/topic"
5
+ -r "ok refs/for/main/topic"
6
EOF
7
'
8
9
-# Refs of upstream : master(A)
10
-# Refs of workbench: master(A) tags/v123
9
+# Refs of upstream : main(A)
10
+# Refs of workbench: main(A) tags/v123
11
# git push : refs/for/a/b/c/my/topic
12
test_expect_success "proc-receive: report unknown reference ($PROTOCOL)" '
13
test_must_fail git -C workbench push origin \
@@ -19,8 +19,8 @@ test_expect_success "proc-receive: report unknown reference ($PROTOCOL)" '
19
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic
20
remote: # proc-receive hook
21
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic
22
- remote: proc-receive> ok refs/for/master/topic
23
- remote: error: proc-receive reported status on unknown ref: refs/for/master/topic
22
+ remote: proc-receive> ok refs/for/main/topic
23
+ remote: error: proc-receive reported status on unknown ref: refs/for/main/topic
24
To <URL/of/upstream.git>
25
! [remote rejected] HEAD -> refs/for/a/b/c/my/topic (proc-receive failed to report status)
26
EOF
@@ -28,7 +28,7 @@ test_expect_success "proc-receive: report unknown reference ($PROTOCOL)" '
28
git -C "$upstream" show-ref >out &&
29
make_user_friendly_and_stable_output <out >actual &&
30
cat >expect <<-EOF &&
31
- <COMMIT-A> refs/heads/master
31
+ <COMMIT-A> refs/heads/main
32
EOF
33
test_cmp expect actual
34
'
t/t5411/test-0025-report-unknown-ref--porcelain.sh
+6
-6
@@ -2,12 +2,12 @@ test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL/porcelai
2
write_script "$upstream/hooks/proc-receive" <<-EOF
3
printf >&2 "# proc-receive hook\n"
4
test-tool proc-receive -v \
5
- -r "ok refs/for/master/topic"
5
+ -r "ok refs/for/main/topic"
6
EOF
7
'
8
9
-# Refs of upstream : master(A)
10
-# Refs of workbench: master(A) tags/v123
9
+# Refs of upstream : main(A)
10
+# Refs of workbench: main(A) tags/v123
11
# git push : refs/for/a/b/c/my/topic
12
test_expect_success "proc-receive: report unknown reference ($PROTOCOL/porcelain)" '
13
test_must_fail git -C workbench push --porcelain origin \
@@ -19,8 +19,8 @@ test_expect_success "proc-receive: report unknown reference ($PROTOCOL/porcelain
19
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic
20
remote: # proc-receive hook
21
remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/my/topic
22
- remote: proc-receive> ok refs/for/master/topic
23
- remote: error: proc-receive reported status on unknown ref: refs/for/master/topic
22
+ remote: proc-receive> ok refs/for/main/topic
23
+ remote: error: proc-receive reported status on unknown ref: refs/for/main/topic
24
To <URL/of/upstream.git>
25
! HEAD:refs/for/a/b/c/my/topic [remote rejected] (proc-receive failed to report status)
26
Done
@@ -29,7 +29,7 @@ test_expect_success "proc-receive: report unknown reference ($PROTOCOL/porcelain
29
git -C "$upstream" show-ref >out &&
30
make_user_friendly_and_stable_output <out >actual &&
31
cat >expect <<-EOF &&
32
- <COMMIT-A> refs/heads/master
32
+ <COMMIT-A> refs/heads/main
33
EOF
34
test_cmp expect actual
35
'
t/t5411/test-0026-push-options.sh
+18
-18
@@ -3,19 +3,19 @@ test_expect_success "setup proc-receive hook and disable push-options ($PROTOCOL
3
write_script "$upstream/hooks/proc-receive" <<-EOF
4
printf >&2 "# proc-receive hook\n"
5
test-tool proc-receive -v \
6
- -r "ok refs/for/master/topic"
6
+ -r "ok refs/for/main/topic"
7
EOF
8
'
9
10
-# Refs of upstream : master(A)
11
-# Refs of workbench: master(A) tags/v123
12
-# git push -o ... : refs/for/master/topic
10
+# Refs of upstream : main(A)
11
+# Refs of workbench: main(A) tags/v123
12
+# git push -o ... : refs/for/main/topic
13
test_expect_success "proc-receive: not support push options ($PROTOCOL)" '
14
test_must_fail git -C workbench push \
15
-o issue=123 \
16
-o reviewer=user1 \
17
origin \
18
- HEAD:refs/for/master/topic \
18
+ HEAD:refs/for/main/topic \
19
>out 2>&1 &&
20
make_user_friendly_and_stable_output <out >actual &&
21
test_i18ngrep "fatal: the receiving end does not support push options" \
@@ -23,7 +23,7 @@ test_expect_success "proc-receive: not support push options ($PROTOCOL)" '
23
git -C "$upstream" show-ref >out &&
24
make_user_friendly_and_stable_output <out >actual &&
25
cat >expect <<-EOF &&
26
- <COMMIT-A> refs/heads/master
26
+ <COMMIT-A> refs/heads/main
27
EOF
28
test_cmp expect actual
29
'
@@ -32,9 +32,9 @@ test_expect_success "enable push options ($PROTOCOL)" '
32
git -C "$upstream" config receive.advertisePushOptions true
33
'
34
35
-# Refs of upstream : master(A)
36
-# Refs of workbench: master(A) tags/v123
37
-# git push -o ... : next(A) refs/for/master/topic
35
+# Refs of upstream : main(A)
36
+# Refs of workbench: main(A) tags/v123
37
+# git push -o ... : next(A) refs/for/main/topic
38
test_expect_success "proc-receive: push with options ($PROTOCOL)" '
39
git -C workbench push \
40
--atomic \
@@ -42,38 +42,38 @@ test_expect_success "proc-receive: push with options ($PROTOCOL)" '
42
-o reviewer=user1 \
43
origin \
44
HEAD:refs/heads/next \
45
- HEAD:refs/for/master/topic \
45
+ HEAD:refs/for/main/topic \
46
>out 2>&1 &&
47
make_user_friendly_and_stable_output <out >actual &&
48
cat >expect <<-EOF &&
49
remote: # pre-receive hook
50
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
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
remote: # proc-receive hook
53
remote: proc-receive: atomic push_options
54
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
54
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
55
remote: proc-receive< issue=123
56
remote: proc-receive< reviewer=user1
57
- remote: proc-receive> ok refs/for/master/topic
57
+ remote: proc-receive> ok refs/for/main/topic
58
remote: # post-receive hook
59
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
60
- remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
60
+ remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
61
To <URL/of/upstream.git>
62
* [new branch] HEAD -> next
63
- * [new reference] HEAD -> refs/for/master/topic
63
+ * [new reference] HEAD -> refs/for/main/topic
64
EOF
65
test_cmp expect actual &&
66
git -C "$upstream" show-ref >out &&
67
make_user_friendly_and_stable_output <out >actual &&
68
cat >expect <<-EOF &&
69
- <COMMIT-A> refs/heads/master
69
+ <COMMIT-A> refs/heads/main
70
<COMMIT-A> refs/heads/next
71
EOF
72
test_cmp expect actual
73
'
74
75
-# Refs of upstream : master(A) next(A)
76
-# Refs of workbench: master(A) tags/v123
75
+# Refs of upstream : main(A) next(A)
76
+# Refs of workbench: main(A) tags/v123
77
test_expect_success "cleanup ($PROTOCOL)" '
78
git -C "$upstream" update-ref -d refs/heads/next
79
'
t/t5411/test-0027-push-options--porcelain.sh
+18
-18
@@ -3,20 +3,20 @@ test_expect_success "setup proc-receive hook and disable push-options ($PROTOCOL
3
write_script "$upstream/hooks/proc-receive" <<-EOF
4
printf >&2 "# proc-receive hook\n"
5
test-tool proc-receive -v \
6
- -r "ok refs/for/master/topic"
6
+ -r "ok refs/for/main/topic"
7
EOF
8
'
9
10
-# Refs of upstream : master(A)
11
-# Refs of workbench: master(A) tags/v123
12
-# git push -o ... : refs/for/master/topic
10
+# Refs of upstream : main(A)
11
+# Refs of workbench: main(A) tags/v123
12
+# git push -o ... : refs/for/main/topic
13
test_expect_success "proc-receive: not support push options ($PROTOCOL/porcelain)" '
14
test_must_fail git -C workbench push \
15
--porcelain \
16
-o issue=123 \
17
-o reviewer=user1 \
18
origin \
19
- HEAD:refs/for/master/topic \
19
+ HEAD:refs/for/main/topic \
20
>out 2>&1 &&
21
make_user_friendly_and_stable_output <out >actual &&
22
test_i18ngrep "fatal: the receiving end does not support push options" \
@@ -24,7 +24,7 @@ test_expect_success "proc-receive: not support push options ($PROTOCOL/porcelain
24
git -C "$upstream" show-ref >out &&
25
make_user_friendly_and_stable_output <out >actual &&
26
cat >expect <<-EOF &&
27
- <COMMIT-A> refs/heads/master
27
+ <COMMIT-A> refs/heads/main
28
EOF
29
test_cmp expect actual
30
'
@@ -33,9 +33,9 @@ test_expect_success "enable push options ($PROTOCOL/porcelain)" '
33
git -C "$upstream" config receive.advertisePushOptions true
34
'
35
36
-# Refs of upstream : master(A)
37
-# Refs of workbench: master(A) tags/v123
38
-# git push -o ... : next(A) refs/for/master/topic
36
+# Refs of upstream : main(A)
37
+# Refs of workbench: main(A) tags/v123
38
+# git push -o ... : next(A) refs/for/main/topic
39
test_expect_success "proc-receive: push with options ($PROTOCOL/porcelain)" '
40
git -C workbench push \
41
--porcelain \
@@ -44,39 +44,39 @@ test_expect_success "proc-receive: push with options ($PROTOCOL/porcelain)" '
44
-o reviewer=user1 \
45
origin \
46
HEAD:refs/heads/next \
47
- HEAD:refs/for/master/topic \
47
+ HEAD:refs/for/main/topic \
48
>out 2>&1 &&
49
make_user_friendly_and_stable_output <out >actual &&
50
cat >expect <<-EOF &&
51
remote: # pre-receive hook
52
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
53
- remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
53
+ remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
54
remote: # proc-receive hook
55
remote: proc-receive: atomic push_options
56
- remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
56
+ remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
57
remote: proc-receive< issue=123
58
remote: proc-receive< reviewer=user1
59
- remote: proc-receive> ok refs/for/master/topic
59
+ remote: proc-receive> ok refs/for/main/topic
60
remote: # post-receive hook
61
remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
62
- remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
62
+ remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
63
To <URL/of/upstream.git>
64
* HEAD:refs/heads/next [new branch]
65
- * HEAD:refs/for/master/topic [new reference]
65
+ * HEAD:refs/for/main/topic [new reference]
66
Done
67
EOF
68
test_cmp expect actual &&
69
git -C "$upstream" show-ref >out &&
70
make_user_friendly_and_stable_output <out >actual &&
71
cat >expect <<-EOF &&
72
- <COMMIT-A> refs/heads/master
72
+ <COMMIT-A> refs/heads/main
73
<COMMIT-A> refs/heads/next
74
EOF
75
test_cmp expect actual
76
'
77
78
-# Refs of upstream : master(A) next(A)
79
-# Refs of workbench: master(A) tags/v123
78
+# Refs of upstream : main(A) next(A)
79
+# Refs of workbench: main(A) tags/v123
80
test_expect_success "cleanup ($PROTOCOL/porcelain)" '
81
git -C "$upstream" update-ref -d refs/heads/next
82
'