git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] t5411: finish preparing for `main` being the default branch name

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 27, 2020, 22:58 UTC
Message-ID
<ac2173cce7c91e6398d17a1b65e3c5e7c7ac3b10.1603839487.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.760.git.1603839487.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

In addition to the trivial search-and-replace performed over the course of the previous three commits, there is one test in t5411 that depends on the length of the default branch name.

Adjust it and use `main` as the default branch name in this test.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t5411-proc-receive-hook.sh          | 8 +++-----
 t/t5411/once-0010-report-status-v1.sh | 6 +++---
 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/t/t5411-proc-receive-hook.sh b/t/t5411-proc-receive-hook.sh
index 06bbb02ed2..98b0e81208 100755
--- a/t/t5411-proc-receive-hook.sh
+++ b/t/t5411-proc-receive-hook.sh
@@ -5,12 +5,10 @@
 
 test_description='Test proc-receive hook'
 
-. ./test-lib.sh
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
-test_have_prereq PREPARE_FOR_MAIN_BRANCH || {
-	test_skip="In transit for the default branch name 'main'"
-	test_done
-}
+. ./test-lib.sh
 
 . "$TEST_DIRECTORY"/t5411/common-functions.sh
 
diff --git a/t/t5411/once-0010-report-status-v1.sh b/t/t5411/once-0010-report-status-v1.sh
index 6005ee0ecb..cb431a9c91 100644
--- a/t/t5411/once-0010-report-status-v1.sh
+++ b/t/t5411/once-0010-report-status-v1.sh
@@ -69,11 +69,11 @@ test_expect_success "proc-receive: report status v1" '
 	proc-receive> option forced-update
 	proc-receive> ng refs/for/next/topic target branch not exist
 	000eunpack ok
-	0019ok refs/heads/main
-	001eok refs/for/main/topic1
+	0017ok refs/heads/main
+	001cok refs/for/main/topic1
 	0016ok refs/heads/foo
 	0033ng refs/for/next/topic target branch not exist
-	001eok refs/for/main/topic2
+	001cok refs/for/main/topic2
 	0000# post-receive hook
 	post-receive< <COMMIT-A> <COMMIT-B> refs/heads/main
 	post-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic1
-- 
gitgitgadget
Previous: Junio C HamanoNext: Johannes Schindelin via GitGitGadget
Message 7 of 14 in “Adjust t5411 for the upcoming change of the default branch name”
  1. 0/4 Adjust t5411 for the upcoming change of the default branch nameJohannes Schindelin via GitGitGadget, Oct 27, 2020
  2. 1/4 t5411: start using the default branch name "main"Johannes Schindelin via GitGitGadget, Oct 27, 2020
  3. Junio C HamanoOct 28, 2020
  4. Junio C HamanoOct 28, 2020
  5. Johannes SchindelinOct 30, 2020
  6. Junio C HamanoOct 30, 2020
  7. 4/4 t5411: finish preparing for `main` being the default branch nameJohannes Schindelin via GitGitGadget, Oct 27, 2020
  8. 3/4 t5411: adjust the remaining support files for init.defaultBranch=mainJohannes Schindelin via GitGitGadget, Oct 27, 2020
  9. 2/4 t5411: start adjusting the support files for init.defaultBranch=mainJohannes Schindelin via GitGitGadget, Oct 27, 2020
  10. 0/4 Adjust t5411 for the upcoming change of the default branch nameJohannes Schindelin via GitGitGadget, Oct 31, 2020
  11. 1/4 t5411: start using the default branch name "main"Johannes Schindelin via GitGitGadget, Oct 31, 2020
  12. 4/4 t5411: finish preparing for `main` being the default branch nameJohannes Schindelin via GitGitGadget, Oct 31, 2020
  13. 3/4 t5411: adjust the remaining support files for init.defaultBranch=mainJohannes Schindelin via GitGitGadget, Oct 31, 2020
  14. 2/4 t5411: start adjusting the support files for init.defaultBranch=mainJohannes Schindelin via GitGitGadget, Oct 31, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.