]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5411: start adjusting the support files for init.defaultBranch=main
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 31 Oct 2020 19:46:01 +0000 (19:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 31 Oct 2020 20:15:17 +0000 (13:15 -0700)
This trick was performed via

$ sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t/t5411/test-00[3-5]*

We do not convert the files in `t/t5411/` in one go because the patch
would be too big (mails larger than 100kB are rejected by the Git
mailing list). Instead, we start with roughly half of the support files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 files changed:
t/t5411/test-0030-report-ok.sh
t/t5411/test-0031-report-ok--porcelain.sh
t/t5411/test-0032-report-with-options.sh
t/t5411/test-0033-report-with-options--porcelain.sh
t/t5411/test-0034-report-ft.sh
t/t5411/test-0035-report-ft--porcelain.sh
t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh
t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
t/t5411/test-0038-report-mixed-refs.sh
t/t5411/test-0039-report-mixed-refs--porcelain.sh
t/t5411/test-0040-process-all-refs.sh
t/t5411/test-0041-process-all-refs--porcelain.sh
t/t5411/test-0050-proc-receive-refs-with-modifiers.sh

index 44c99d38319ad7e28eb233e2874046a865e7f996..5d6feef118f7e4f4d25b7d9474528fe70b9f987d 100644 (file)
@@ -2,34 +2,34 @@ test_expect_success "setup proc-receive hook (ok, $PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic"
+               -r "ok refs/for/main/topic"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic
 test_expect_success "proc-receive: ok ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: # post-receive hook
-       remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        To <URL/of/upstream.git>
-        * [new reference] HEAD -> refs/for/master/topic
+        * [new reference] HEAD -> refs/for/main/topic
        EOF
        test_cmp expect actual &&
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
index 3223b26184f43f158b7e2ab6a8cbcc4ed0149bf6..91666d32df5fccd76c80cae4592ef6efb2532773 100644 (file)
@@ -2,35 +2,35 @@ test_expect_success "setup proc-receive hook (ok, $PROTOCOL/porcelain)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic"
+               -r "ok refs/for/main/topic"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic
 test_expect_success "proc-receive: ok ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: # post-receive hook
-       remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        To <URL/of/upstream.git>
-       *    HEAD:refs/for/master/topic    [new reference]
+       *    HEAD:refs/for/main/topic    [new reference]
        Done
        EOF
        test_cmp expect actual &&
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
index b77b78c49ff938efb9a48a36d31b6b465d13559f..a0faf5c7ff04d414f22e79e688bcc23a0452fff0 100644 (file)
@@ -7,24 +7,24 @@ test_expect_success "setup proc-receive hook (option without matching ok, $PROTO
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option without matching ok ($PROTOCOL)" '
        test_must_fail git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: error: proc-receive reported "option" without a matching "ok/ng" directive
        To <URL/of/upstream.git>
-        ! [remote rejected] HEAD -> refs/for/master/topic (proc-receive failed to report status)
+        ! [remote rejected] HEAD -> refs/for/main/topic (proc-receive failed to report status)
        EOF
        test_cmp expect actual
 '
@@ -33,25 +33,25 @@ test_expect_success "setup proc-receive hook (option refname, $PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option refname ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: # post-receive hook
        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,
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head" \
                -r "option forced-update"
        EOF
 '
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option refname and forced-update ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option forced-update
        remote: # post-receive hook
@@ -98,26 +98,26 @@ test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTO
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head" \
                -r "option old-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option refname and old-oid ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: # post-receive hook
@@ -132,30 +132,30 @@ test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option old-oid ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic
+       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic
        To <URL/of/upstream.git>
-        <OID-B>..<OID-A> HEAD -> refs/for/master/topic
+        <OID-B>..<OID-A> HEAD -> refs/for/main/topic
        EOF
        test_cmp expect actual
 '
@@ -164,32 +164,32 @@ test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTO
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option old-oid and new-oid ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        To <URL/of/upstream.git>
-        <OID-A>..<OID-B> HEAD -> refs/for/master/topic
+        <OID-A>..<OID-B> HEAD -> refs/for/main/topic
        EOF
        test_cmp expect actual
 '
@@ -201,7 +201,7 @@ test_expect_success "setup proc-receive hook (report with multiple rewrites, $PR
                -r "ok refs/for/a/b/c/topic" \
                -r "ok refs/for/next/topic" \
                -r "option refname refs/pull/123/head" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/124/head" \
                -r "option old-oid $B" \
                -r "option forced-update" \
@@ -209,29 +209,29 @@ test_expect_success "setup proc-receive hook (report with multiple rewrites, $PR
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL)" '
        git -C workbench push origin \
                HEAD:refs/for/next/topic \
                HEAD:refs/for/a/b/c/topic \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive> ok refs/for/a/b/c/topic
        remote: proc-receive> ok refs/for/next/topic
        remote: proc-receive> option refname refs/pull/123/head
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/124/head
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: proc-receive> option forced-update
@@ -250,7 +250,7 @@ test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL)" '
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
index 1fe352b6860880f27f35218844f0118c00bba374..32ae26bcfb0e5b9b2ce106fe1443ecaed9fd0cb9 100644 (file)
@@ -7,24 +7,24 @@ test_expect_success "setup proc-receive hook (option without matching ok, $PROTO
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option without matching ok ($PROTOCOL/porcelain)" '
        test_must_fail git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: error: proc-receive reported "option" without a matching "ok/ng" directive
        To <URL/of/upstream.git>
-       !    HEAD:refs/for/master/topic    [remote rejected] (proc-receive failed to report status)
+       !    HEAD:refs/for/main/topic    [remote rejected] (proc-receive failed to report status)
        Done
        EOF
        test_cmp expect actual
@@ -34,25 +34,25 @@ test_expect_success "setup proc-receive hook (option refname, $PROTOCOL/porcelai
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option refname ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: # post-receive hook
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/pull/123/head
@@ -67,26 +67,26 @@ test_expect_success "setup proc-receive hook (option refname and forced-update,
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head" \
                -r "option forced-update"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option refname and forced-update ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option forced-update
        remote: # post-receive hook
@@ -102,26 +102,26 @@ test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTO
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head" \
                -r "option old-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option refname and old-oid ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: # post-receive hook
@@ -137,30 +137,30 @@ test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL/porcelai
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option old-oid ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/master/topic
+       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/for/main/topic
        To <URL/of/upstream.git>
-            HEAD:refs/for/master/topic    <OID-B>..<OID-A>
+            HEAD:refs/for/main/topic    <OID-B>..<OID-A>
        Done
        EOF
        test_cmp expect actual
@@ -170,32 +170,32 @@ test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTO
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report option old-oid and new-oid ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        To <URL/of/upstream.git>
-            HEAD:refs/for/master/topic    <OID-A>..<OID-B>
+            HEAD:refs/for/main/topic    <OID-A>..<OID-B>
        Done
        EOF
        test_cmp expect actual
@@ -208,7 +208,7 @@ test_expect_success "setup proc-receive hook (report with multiple rewrites, $PR
                -r "ok refs/for/a/b/c/topic" \
                -r "ok refs/for/next/topic" \
                -r "option refname refs/pull/123/head" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/124/head" \
                -r "option old-oid $B" \
                -r "option forced-update" \
@@ -217,29 +217,29 @@ test_expect_success "setup proc-receive hook (report with multiple rewrites, $PR
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/next/topic(A)  refs/for/a/b/c/topic(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
                HEAD:refs/for/next/topic \
                HEAD:refs/for/a/b/c/topic \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/a/b/c/topic
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive> ok refs/for/a/b/c/topic
        remote: proc-receive> ok refs/for/next/topic
        remote: proc-receive> option refname refs/pull/123/head
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/124/head
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: proc-receive> option forced-update
@@ -259,7 +259,7 @@ test_expect_success "proc-receive: report with multiple rewrites ($PROTOCOL/porc
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
index aca2b0676c4b6c77f7c26b9fa6f7b36eaaa8aee0..c355c290d2f0c56c7e7408902f5434f6908644e0 100644 (file)
@@ -2,43 +2,43 @@ test_expect_success "setup proc-receive hook (ft, $PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option fall-through"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(B)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(B)
 test_expect_success "proc-receive: fall throught, let receive-pack to execute ($PROTOCOL)" '
        git -C workbench push origin \
-               $B:refs/for/master/topic \
+               $B:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option fall-through
        remote: # post-receive hook
-       remote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic
        To <URL/of/upstream.git>
-        * [new reference] <COMMIT-B> -> refs/for/master/topic
+        * [new reference] <COMMIT-B> -> refs/for/main/topic
        EOF
        test_cmp expect actual &&
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-B> refs/for/master/topic
-       <COMMIT-A> refs/heads/master
+       <COMMIT-B> refs/for/main/topic
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(A)             refs/for/master/topic(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)             refs/for/main/topic(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "cleanup ($PROTOCOL)" '
-       git -C "$upstream" update-ref -d refs/for/master/topic
+       git -C "$upstream" update-ref -d refs/for/main/topic
 '
index 30ffffb352d65a1c46c016075f4e7d0c52b89a80..8ce4e58f2a5c483137946766a2d3ad8a7adab280 100644 (file)
@@ -2,44 +2,44 @@ test_expect_success "setup proc-receive hook (fall-through, $PROTOCOL/porcelain)
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option fall-through"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(B)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(B)
 test_expect_success "proc-receive: fall throught, let receive-pack to execute ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               $B:refs/for/master/topic \
+               $B:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option fall-through
        remote: # post-receive hook
-       remote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <ZERO-OID> <COMMIT-B> refs/for/main/topic
        To <URL/of/upstream.git>
-       *    <COMMIT-B>:refs/for/master/topic    [new reference]
+       *    <COMMIT-B>:refs/for/main/topic    [new reference]
        Done
        EOF
        test_cmp expect actual &&
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-B> refs/for/master/topic
-       <COMMIT-A> refs/heads/master
+       <COMMIT-B> refs/for/main/topic
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(A)             refs/for/master/topic(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)             refs/for/main/topic(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "cleanup ($PROTOCOL/porcelain)" '
-       git -C "$upstream" update-ref -d refs/for/master/topic
+       git -C "$upstream" update-ref -d refs/for/main/topic
 '
index 73283d81e8a3312b3418c7b793c00d33ef2490f8..fad8eea8a060f640e76e6b93b076a95c95660982 100644 (file)
@@ -17,50 +17,50 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/24/124/1" \
                -r "option old-oid $ZERO_OID" \
                -r "option new-oid $A" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/25/125/1" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(A)
 test_expect_success "proc-receive: multiple rewrite for one ref, no refname for the 1st rewrite ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/24/124/1
        remote: proc-receive> option old-oid <ZERO-OID>
        remote: proc-receive> option new-oid <COMMIT-A>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/25/125/1
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1
        remote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1
        To <URL/of/upstream.git>
-        <OID-A>..<OID-B> HEAD -> refs/for/master/topic
+        <OID-A>..<OID-B> HEAD -> refs/for/main/topic
         * [new reference] HEAD -> refs/changes/24/124/1
         <OID-A>..<OID-B> HEAD -> refs/changes/25/125/1
        EOF
@@ -68,7 +68,7 @@ test_expect_success "proc-receive: multiple rewrite for one ref, no refname for
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
@@ -80,10 +80,10 @@ test_expect_success "proc-receive: check remote-tracking #1 ($PROTOCOL)" '
        cat >expect <<-EOF &&
        <COMMIT-A> refs/t/changes/24/124/1
        <COMMIT-B> refs/t/changes/25/125/1
-       <COMMIT-B> refs/t/for/master/topic
+       <COMMIT-B> refs/t/for/main/topic
        EOF
        test_cmp expect actual &&
-       git -C workbench update-ref -d refs/t/for/master/topic &&
+       git -C workbench update-ref -d refs/t/for/main/topic &&
        git -C workbench update-ref -d refs/t/changes/24/124/1 &&
        git -C workbench update-ref -d refs/t/changes/25/125/1
 '
@@ -92,14 +92,14 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/24/124/1" \
                -r "option old-oid $ZERO_OID" \
                -r "option new-oid $A" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/25/125/1" \
                -r "option old-oid $B" \
                -r "option new-oid $A" \
@@ -107,45 +107,45 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(A)
 test_expect_success "proc-receive: multiple rewrites for one ref, no refname for the 2nd rewrite ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/24/124/1
        remote: proc-receive> option old-oid <ZERO-OID>
        remote: proc-receive> option new-oid <COMMIT-A>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/25/125/1
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: proc-receive> option new-oid <COMMIT-A>
        remote: proc-receive> option forced-update
        remote: # post-receive hook
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        remote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1
        To <URL/of/upstream.git>
         * [new reference] HEAD -> refs/changes/24/124/1
-        <OID-A>..<OID-B> HEAD -> refs/for/master/topic
+        <OID-A>..<OID-B> HEAD -> refs/for/main/topic
         + <OID-B>...<OID-A> HEAD -> refs/changes/25/125/1 (forced update)
        EOF
        test_cmp expect actual &&
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
@@ -157,10 +157,10 @@ test_expect_success "proc-receive: check remote-tracking #2 ($PROTOCOL)" '
        cat >expect <<-EOF &&
        <COMMIT-A> refs/t/changes/24/124/1
        <COMMIT-A> refs/t/changes/25/125/1
-       <COMMIT-B> refs/t/for/master/topic
+       <COMMIT-B> refs/t/for/main/topic
        EOF
        test_cmp expect actual &&
-       git -C workbench update-ref -d refs/t/for/master/topic &&
+       git -C workbench update-ref -d refs/t/for/main/topic &&
        git -C workbench update-ref -d refs/t/changes/24/124/1 &&
        git -C workbench update-ref -d refs/t/changes/25/125/1
 '
@@ -169,31 +169,31 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, $PR
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/23/123/1" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/24/124/2" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(A)
 test_expect_success "proc-receive: multiple rewrites for one ref ($PROTOCOL)" '
        git -C workbench push origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/23/123/1
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/24/124/2
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
@@ -208,7 +208,7 @@ test_expect_success "proc-receive: multiple rewrites for one ref ($PROTOCOL)" '
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
index 77b5b22ed4e5faee47f5bd9bd94ae0c0ccb53d69..dc254d57eb0ddbe8aa6e2803bf86c58980600d70 100644 (file)
@@ -2,50 +2,50 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/24/124/1" \
                -r "option old-oid $ZERO_OID" \
                -r "option new-oid $A" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/25/125/1" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(A)
 test_expect_success "proc-receive: multiple rewrite for one ref, no refname for the 1st rewrite ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/24/124/1
        remote: proc-receive> option old-oid <ZERO-OID>
        remote: proc-receive> option new-oid <COMMIT-A>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/25/125/1
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1
        remote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1
        To <URL/of/upstream.git>
-            HEAD:refs/for/master/topic    <OID-A>..<OID-B>
+            HEAD:refs/for/main/topic    <OID-A>..<OID-B>
        *    HEAD:refs/changes/24/124/1    [new reference]
             HEAD:refs/changes/25/125/1    <OID-A>..<OID-B>
        Done
@@ -54,7 +54,7 @@ test_expect_success "proc-receive: multiple rewrite for one ref, no refname for
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
@@ -63,14 +63,14 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/24/124/1" \
                -r "option old-oid $ZERO_OID" \
                -r "option new-oid $A" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/25/125/1" \
                -r "option old-oid $B" \
                -r "option new-oid $A" \
@@ -78,38 +78,38 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(A)
 test_expect_success "proc-receive: multiple rewrites for one ref, no refname for the 2nd rewrite ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/24/124/1
        remote: proc-receive> option old-oid <ZERO-OID>
        remote: proc-receive> option new-oid <COMMIT-A>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/25/125/1
        remote: proc-receive> option old-oid <COMMIT-B>
        remote: proc-receive> option new-oid <COMMIT-A>
        remote: proc-receive> option forced-update
        remote: # post-receive hook
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        remote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1
        To <URL/of/upstream.git>
        *    HEAD:refs/changes/24/124/1    [new reference]
-            HEAD:refs/for/master/topic    <OID-A>..<OID-B>
+            HEAD:refs/for/main/topic    <OID-A>..<OID-B>
        +    HEAD:refs/changes/25/125/1    <OID-B>...<OID-A> (forced update)
        Done
        EOF
@@ -117,7 +117,7 @@ test_expect_success "proc-receive: multiple rewrites for one ref, no refname for
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
@@ -126,31 +126,31 @@ test_expect_success "setup proc-receive hook (multiple rewrites for one ref, $PR
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/23/123/1" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/changes/24/124/2" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         :                       refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         :                       refs/for/main/topic(A)
 test_expect_success "proc-receive: multiple rewrites for one ref ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain origin \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: # proc-receive hook
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/23/123/1
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/changes/24/124/2
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
@@ -166,7 +166,7 @@ test_expect_success "proc-receive: multiple rewrites for one ref ($PROTOCOL/porc
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
index a74a2cb4498951c008218de5eed578a2ddff4edc..0d071ebaa6c9dc8cd40bca37d8e4806d2b94cd6e 100644 (file)
@@ -4,63 +4,63 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        test-tool proc-receive -v \
                -r "ok refs/for/next/topic2" \
                -r "ng refs/for/next/topic1 fail to call Web API" \
-               -r "ok refs/for/master/topic" \
-               -r "option refname refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
+               -r "option refname refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report update of mixed refs ($PROTOCOL)" '
        test_must_fail git -C workbench push origin \
-               $B:refs/heads/master \
+               $B:refs/heads/main \
                HEAD:refs/heads/bar \
                HEAD:refs/heads/baz \
                HEAD:refs/for/next/topic2 \
                HEAD:refs/for/next/topic1 \
                HEAD:refs/heads/foo \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                HEAD:refs/for/next/topic3 \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
+       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3
        remote: # proc-receive hook
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3
        remote: proc-receive> ok refs/for/next/topic2
        remote: proc-receive> ng refs/for/next/topic1 fail to call Web API
-       remote: proc-receive> ok refs/for/master/topic
-       remote: proc-receive> option refname refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
+       remote: proc-receive> option refname refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        To <URL/of/upstream.git>
-        <OID-A>..<OID-B> <COMMIT-B> -> master
+        <OID-A>..<OID-B> <COMMIT-B> -> main
         * [new branch] HEAD -> bar
         * [new branch] HEAD -> baz
         * [new reference] HEAD -> refs/for/next/topic2
         * [new branch] HEAD -> foo
-        <OID-A>..<OID-B> HEAD -> refs/for/master/topic
+        <OID-A>..<OID-B> HEAD -> refs/for/main/topic
         ! [remote rejected] HEAD -> refs/for/next/topic1 (fail to call Web API)
         ! [remote rejected] HEAD -> refs/for/next/topic3 (proc-receive failed to report status)
        EOF
@@ -71,17 +71,17 @@ test_expect_success "proc-receive: report update of mixed refs ($PROTOCOL)" '
        <COMMIT-A> refs/heads/bar
        <COMMIT-A> refs/heads/baz
        <COMMIT-A> refs/heads/foo
-       <COMMIT-B> refs/heads/master
+       <COMMIT-B> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "cleanup ($PROTOCOL)" '
        (
                cd "$upstream" &&
-               git update-ref refs/heads/master $A &&
+               git update-ref refs/heads/main $A &&
                git update-ref -d refs/heads/foo &&
                git update-ref -d refs/heads/bar &&
                git update-ref -d refs/heads/baz
index e4baa13ea3306f85dccbe56823df94350d1b4503..d8409912fd3af493f116a0ae735f0b5bd821552a 100644 (file)
@@ -4,63 +4,63 @@ test_expect_success "setup proc-receive hook ($PROTOCOL/porcelain)" '
        test-tool proc-receive -v \
                -r "ok refs/for/next/topic2" \
                -r "ng refs/for/next/topic1 fail to call Web API" \
-               -r "ok refs/for/master/topic" \
-               -r "option refname refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
+               -r "option refname refs/for/main/topic" \
                -r "option old-oid $A" \
                -r "option new-oid $B"
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/master/topic(A)
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         : (B)                   bar(A)  baz(A)  refs/for/next/topic(A)  foo(A)  refs/for/main/topic(A)
 test_expect_success "proc-receive: report update of mixed refs ($PROTOCOL/porcelain)" '
        test_must_fail git -C workbench push --porcelain origin \
-               $B:refs/heads/master \
+               $B:refs/heads/main \
                HEAD:refs/heads/bar \
                HEAD:refs/heads/baz \
                HEAD:refs/for/next/topic2 \
                HEAD:refs/for/next/topic1 \
                HEAD:refs/heads/foo \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                HEAD:refs/for/next/topic3 \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
+       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3
        remote: # proc-receive hook
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic1
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic3
        remote: proc-receive> ok refs/for/next/topic2
        remote: proc-receive> ng refs/for/next/topic1 fail to call Web API
-       remote: proc-receive> ok refs/for/master/topic
-       remote: proc-receive> option refname refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
+       remote: proc-receive> option refname refs/for/main/topic
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
        remote: # post-receive hook
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/bar
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/baz
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic2
        remote: post-receive< <ZERO-OID> <COMMIT-A> refs/heads/foo
-       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/master/topic
+       remote: post-receive< <COMMIT-A> <COMMIT-B> refs/for/main/topic
        To <URL/of/upstream.git>
-            <COMMIT-B>:refs/heads/master    <OID-A>..<OID-B>
+            <COMMIT-B>:refs/heads/main    <OID-A>..<OID-B>
        *    HEAD:refs/heads/bar    [new branch]
        *    HEAD:refs/heads/baz    [new branch]
        *    HEAD:refs/for/next/topic2    [new reference]
        *    HEAD:refs/heads/foo    [new branch]
-            HEAD:refs/for/master/topic    <OID-A>..<OID-B>
+            HEAD:refs/for/main/topic    <OID-A>..<OID-B>
        !    HEAD:refs/for/next/topic1    [remote rejected] (fail to call Web API)
        !    HEAD:refs/for/next/topic3    [remote rejected] (proc-receive failed to report status)
        Done
@@ -72,17 +72,17 @@ test_expect_success "proc-receive: report update of mixed refs ($PROTOCOL/porcel
        <COMMIT-A> refs/heads/bar
        <COMMIT-A> refs/heads/baz
        <COMMIT-A> refs/heads/foo
-       <COMMIT-B> refs/heads/master
+       <COMMIT-B> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "cleanup ($PROTOCOL/porcelain)" '
        (
                cd "$upstream" &&
-               git update-ref refs/heads/master $A &&
+               git update-ref refs/heads/main $A &&
                git update-ref -d refs/heads/foo &&
                git update-ref -d refs/heads/bar &&
                git update-ref -d refs/heads/baz
index b07c999f53926547302312260083c1bc30190eb2..2565302a1791efc131597c2160c3e574d6ea92a4 100644 (file)
@@ -3,12 +3,12 @@ test_expect_success "config receive.procReceiveRefs = refs ($PROTOCOL)" '
        git -C "$upstream" config --add receive.procReceiveRefs refs
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "setup upstream branches ($PROTOCOL)" '
        (
                cd "$upstream" &&
-               git update-ref refs/heads/master $B &&
+               git update-ref refs/heads/main $B &&
                git update-ref refs/heads/foo $A &&
                git update-ref refs/heads/bar $A &&
                git update-ref refs/heads/baz $A
@@ -20,13 +20,13 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/heads/master" \
+               -r "ok refs/heads/main" \
                -r "option fall-through" \
                -r "ok refs/heads/foo" \
                -r "option fall-through" \
                -r "ok refs/heads/bar" \
                -r "option fall-through" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
@@ -38,15 +38,15 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        EOF
 '
 
-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)
-# Refs of workbench: master(A)  tags/v123
-# git push -f      : master(A)             (NULL)  (B)              refs/for/master/topic(A)  refs/for/next/topic(A)
+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)
+# Refs of workbench: main(A)  tags/v123
+# git push -f      : main(A)             (NULL)  (B)              refs/for/main/topic(A)  refs/for/next/topic(A)
 test_expect_success "proc-receive: process all refs ($PROTOCOL)" '
        git -C workbench push -f origin \
-               HEAD:refs/heads/master \
+               HEAD:refs/heads/main \
                :refs/heads/foo \
                $B:refs/heads/bar \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                HEAD:refs/for/next/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
@@ -54,22 +54,22 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL)" '
        remote: # pre-receive hook
        remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar
        remote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo
-       remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
        remote: # proc-receive hook
        remote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar
        remote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo
-       remote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
-       remote: proc-receive> ok refs/heads/master
+       remote: proc-receive> ok refs/heads/main
        remote: proc-receive> option fall-through
        remote: proc-receive> ok refs/heads/foo
        remote: proc-receive> option fall-through
        remote: proc-receive> ok refs/heads/bar
        remote: proc-receive> option fall-through
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
@@ -81,13 +81,13 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL)" '
        remote: # post-receive hook
        remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar
        remote: post-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo
-       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
+       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
        remote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head
        remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head
        To <URL/of/upstream.git>
         <OID-A>..<OID-B> <COMMIT-B> -> bar
         - [deleted] foo
-        + <OID-B>...<OID-A> HEAD -> master (forced update)
+        + <OID-B>...<OID-A> HEAD -> main (forced update)
         <OID-A>..<OID-B> HEAD -> refs/pull/123/head
         + <OID-B>...<OID-A> HEAD -> refs/pull/124/head (forced update)
        EOF
@@ -97,13 +97,13 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL)" '
        cat >expect <<-EOF &&
        <COMMIT-B> refs/heads/bar
        <COMMIT-A> refs/heads/baz
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(A)             bar(A)  baz(B)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)             bar(A)  baz(B)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "cleanup ($PROTOCOL)" '
        (
                cd "$upstream" &&
index 0dd982461668d11eb9da772f544cfcb86f56de14..e21420b60dd823a589c06e1885ea2276fbed573f 100644 (file)
@@ -3,12 +3,12 @@ test_expect_success "config receive.procReceiveRefs = refs ($PROTOCOL/porcelain)
        git -C "$upstream" config --add receive.procReceiveRefs refs
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "setup upstream branches ($PROTOCOL/porcelain)" '
        (
                cd "$upstream" &&
-               git update-ref refs/heads/master $B &&
+               git update-ref refs/heads/main $B &&
                git update-ref refs/heads/foo $A &&
                git update-ref refs/heads/bar $A &&
                git update-ref refs/heads/baz $A
@@ -20,13 +20,13 @@ test_expect_success "setup proc-receive hook ($PROTOCOL/porcelain)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/heads/master" \
+               -r "ok refs/heads/main" \
                -r "option fall-through" \
                -r "ok refs/heads/foo" \
                -r "option fall-through" \
                -r "ok refs/heads/bar" \
                -r "option fall-through" \
-               -r "ok refs/for/master/topic" \
+               -r "ok refs/for/main/topic" \
                -r "option refname refs/pull/123/head" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
@@ -38,15 +38,15 @@ test_expect_success "setup proc-receive hook ($PROTOCOL/porcelain)" '
        EOF
 '
 
-# Refs of upstream : master(B)             foo(A)  bar(A))  baz(A)
-# Refs of workbench: master(A)  tags/v123
-# git push -f      : master(A)             (NULL)  (B)              refs/for/master/topic(A)  refs/for/next/topic(A)
+# Refs of upstream : main(B)             foo(A)  bar(A))  baz(A)
+# Refs of workbench: main(A)  tags/v123
+# git push -f      : main(A)             (NULL)  (B)              refs/for/main/topic(A)  refs/for/next/topic(A)
 test_expect_success "proc-receive: process all refs ($PROTOCOL/porcelain)" '
        git -C workbench push --porcelain -f origin \
-               HEAD:refs/heads/master \
+               HEAD:refs/heads/main \
                :refs/heads/foo \
                $B:refs/heads/bar \
-               HEAD:refs/for/master/topic \
+               HEAD:refs/for/main/topic \
                HEAD:refs/for/next/topic \
                >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
@@ -54,22 +54,22 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL/porcelain)" '
        remote: # pre-receive hook
        remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar
        remote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo
-       remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
-       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: pre-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
+       remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
        remote: # proc-receive hook
        remote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar
        remote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo
-       remote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
-       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
+       remote: proc-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
+       remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/next/topic
-       remote: proc-receive> ok refs/heads/master
+       remote: proc-receive> ok refs/heads/main
        remote: proc-receive> option fall-through
        remote: proc-receive> ok refs/heads/foo
        remote: proc-receive> option fall-through
        remote: proc-receive> ok refs/heads/bar
        remote: proc-receive> option fall-through
-       remote: proc-receive> ok refs/for/master/topic
+       remote: proc-receive> ok refs/for/main/topic
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
@@ -81,13 +81,13 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL/porcelain)" '
        remote: # post-receive hook
        remote: post-receive< <COMMIT-A> <COMMIT-B> refs/heads/bar
        remote: post-receive< <COMMIT-A> <ZERO-OID> refs/heads/foo
-       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/master
+       remote: post-receive< <COMMIT-B> <COMMIT-A> refs/heads/main
        remote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head
        remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head
        To <URL/of/upstream.git>
             <COMMIT-B>:refs/heads/bar    <OID-A>..<OID-B>
        -    :refs/heads/foo    [deleted]
-       +    HEAD:refs/heads/master    <OID-B>...<OID-A> (forced update)
+       +    HEAD:refs/heads/main    <OID-B>...<OID-A> (forced update)
             HEAD:refs/pull/123/head    <OID-A>..<OID-B>
        +    HEAD:refs/pull/124/head    <OID-B>...<OID-A> (forced update)
        Done
@@ -98,13 +98,13 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL/porcelain)" '
        cat >expect <<-EOF &&
        <COMMIT-B> refs/heads/bar
        <COMMIT-A> refs/heads/baz
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(A)             bar(A)  baz(B)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)             bar(A)  baz(B)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "cleanup ($PROTOCOL/porcelain)" '
        (
                cd "$upstream" &&
index c22849cbe2feaa135deee07899812d1cbb30ec79..2e29518ec5fb737ac40940f52a3b50cc99d9ba17 100644 (file)
@@ -2,7 +2,7 @@ test_expect_success "config receive.procReceiveRefs with modifiers ($PROTOCOL)"
        (
                cd "$upstream" &&
                git config --unset-all receive.procReceiveRefs &&
-               git config --add receive.procReceiveRefs m:refs/heads/master &&
+               git config --add receive.procReceiveRefs m:refs/heads/main &&
                git config --add receive.procReceiveRefs ad:refs/heads &&
                git config --add receive.procReceiveRefs "a!:refs/heads"
        )
@@ -12,7 +12,7 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/heads/master" \
+               -r "ok refs/heads/main" \
                -r "option refname refs/pull/123/head" \
                -r "option old-oid $A" \
                -r "option new-oid $B" \
@@ -21,22 +21,22 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        EOF
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
-# git push         : master(B)  tags/v123
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
+# git push         : main(B)  tags/v123
 test_expect_success "proc-receive: update branch and new tag ($PROTOCOL)" '
        git -C workbench push origin \
-               $B:refs/heads/master \
+               $B:refs/heads/main \
                v123 >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
+       remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
        remote: pre-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
        remote: # proc-receive hook
-       remote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/master
+       remote: proc-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
        remote: proc-receive< <ZERO-OID> <TAG-v123> refs/tags/v123
-       remote: proc-receive> ok refs/heads/master
+       remote: proc-receive> ok refs/heads/main
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <COMMIT-B>
@@ -53,20 +53,20 @@ test_expect_success "proc-receive: update branch and new tag ($PROTOCOL)" '
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        EOF
        test_cmp expect actual
 '
 
-# Refs of upstream : master(A)
-# Refs of workbench: master(A)  tags/v123
+# Refs of upstream : main(A)
+# Refs of workbench: main(A)  tags/v123
 test_expect_success "setup upstream: create tags/v123 ($PROTOCOL)" '
        git -C "$upstream" update-ref refs/heads/topic $A &&
        git -C "$upstream" update-ref refs/tags/v123 $TAG &&
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        <COMMIT-A> refs/heads/topic
        <TAG-v123> refs/tags/v123
        EOF
@@ -77,7 +77,7 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        write_script "$upstream/hooks/proc-receive" <<-EOF
        printf >&2 "# proc-receive hook\n"
        test-tool proc-receive -v \
-               -r "ok refs/heads/master" \
+               -r "ok refs/heads/main" \
                -r "option refname refs/pull/123/head" \
                -r "option old-oid $A" \
                -r "option new-oid $ZERO_OID" \
@@ -87,26 +87,26 @@ test_expect_success "setup proc-receive hook ($PROTOCOL)" '
        EOF
 '
 
-# Refs of upstream : master(A)  topic(A)  tags/v123
-# Refs of workbench: master(A)            tags/v123
+# Refs of upstream : main(A)  topic(A)  tags/v123
+# Refs of workbench: main(A)            tags/v123
 # git push         : NULL       topic(B)  NULL       next(A)
 test_expect_success "proc-receive: create/delete branch, and delete tag ($PROTOCOL)" '
        git -C workbench push origin \
-               :refs/heads/master \
+               :refs/heads/main \
                $B:refs/heads/topic \
                $A:refs/heads/next \
                :refs/tags/v123 >out 2>&1 &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
        remote: # pre-receive hook
-       remote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/master
+       remote: pre-receive< <COMMIT-A> <ZERO-OID> refs/heads/main
        remote: pre-receive< <COMMIT-A> <COMMIT-B> refs/heads/topic
        remote: pre-receive< <TAG-v123> <ZERO-OID> refs/tags/v123
        remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
        remote: # proc-receive hook
-       remote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/master
+       remote: proc-receive< <COMMIT-A> <ZERO-OID> refs/heads/main
        remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
-       remote: proc-receive> ok refs/heads/master
+       remote: proc-receive> ok refs/heads/main
        remote: proc-receive> option refname refs/pull/123/head
        remote: proc-receive> option old-oid <COMMIT-A>
        remote: proc-receive> option new-oid <ZERO-OID>
@@ -128,7 +128,7 @@ test_expect_success "proc-receive: create/delete branch, and delete tag ($PROTOC
        git -C "$upstream" show-ref >out &&
        make_user_friendly_and_stable_output <out >actual &&
        cat >expect <<-EOF &&
-       <COMMIT-A> refs/heads/master
+       <COMMIT-A> refs/heads/main
        <COMMIT-B> refs/heads/topic
        EOF
        test_cmp expect actual