From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Felipe Contreras" <felipe.contreras@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Jeff King" <peff@peff.net>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: [PATCH v2 22/27] t8*: adjust the references to the default branch name "main"
Date: Tue, 17 Nov 2020 16:12:22 +0000 [thread overview]
Message-ID: <5cac0065c87e6acf1ed95ed5f24c1027048e7b6f.1605629549.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.762.v2.git.1605629547.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
This trick was performed via
$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t8*.sh annotate*.sh)
This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`
for those tests.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
t/annotate-tests.sh | 8 ++++----
t/t8001-annotate.sh | 2 +-
t/t8003-blame-corner-cases.sh | 4 ++--
t/t8004-blame-with-conflicts.sh | 14 +++++++-------
t/test-lib.sh | 2 +-
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 3aee61d2cc..ee5d2d4cf8 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -95,7 +95,7 @@ test_expect_success 'blame 2 authors' '
'
test_expect_success 'setup B1 lines (branch1)' '
- git checkout -b branch1 master &&
+ git checkout -b branch1 main &&
echo "3A slow green fox jumps into the" >>file &&
echo "well." >>file &&
GIT_AUTHOR_NAME="B1" GIT_AUTHOR_EMAIL="B1@test.git" \
@@ -107,7 +107,7 @@ test_expect_success 'blame 2 authors + 1 branch1 author' '
'
test_expect_success 'setup B2 lines (branch2)' '
- git checkout -b branch2 master &&
+ git checkout -b branch2 main &&
sed -e "s/2A quick brown/4A quick brown lazy dog/" <file >file.new &&
mv file.new file &&
GIT_AUTHOR_NAME="B2" GIT_AUTHOR_EMAIL="B2@test.git" \
@@ -131,11 +131,11 @@ test_expect_success 'blame --first-parent blames merge for branch1' '
'
test_expect_success 'blame ancestor' '
- check_count -h master A 2 B 2
+ check_count -h main A 2 B 2
'
test_expect_success 'blame great-ancestor' '
- check_count -h master^ A 2
+ check_count -h main^ A 2
'
test_expect_success 'setup evil merge' '
diff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh
index 72176e42c1..3687fc58d8 100755
--- a/t/t8001-annotate.sh
+++ b/t/t8001-annotate.sh
@@ -7,7 +7,7 @@ PROG='git annotate'
. "$TEST_DIRECTORY"/annotate-tests.sh
test_expect_success 'annotate old revision' '
- git annotate file master >actual &&
+ git annotate file main >actual &&
awk "{ print \$3; }" <actual >authors &&
test 2 = $(grep A <authors | wc -l) &&
test 2 = $(grep B <authors | wc -l)
diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh
index ba8013b002..2e499b4511 100755
--- a/t/t8003-blame-corner-cases.sh
+++ b/t/t8003-blame-corner-cases.sh
@@ -161,13 +161,13 @@ test_expect_success 'blame wholesale copy and more in the index' '
test_expect_success 'blame during cherry-pick with file rename conflict' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
git checkout HEAD~3 &&
echo MOUSE >> mouse &&
git mv mouse rodent &&
git add rodent &&
GIT_AUTHOR_NAME=Rodent git commit -m "rodent" &&
- git checkout --detach master &&
+ git checkout --detach main &&
(git cherry-pick HEAD@{1} || test $? -eq 1) &&
git show HEAD@{1}:rodent > rodent &&
git add rodent &&
diff --git a/t/t8004-blame-with-conflicts.sh b/t/t8004-blame-with-conflicts.sh
index 9c353ab222..b6c992ec45 100755
--- a/t/t8004-blame-with-conflicts.sh
+++ b/t/t8004-blame-with-conflicts.sh
@@ -21,16 +21,16 @@ test_expect_success 'setup first case' '
git add file2 &&
git commit --author "U Gly <ug@localhost>" -m ugly &&
- # Back to master and change something
- git checkout master &&
+ # Back to main and change something
+ git checkout main &&
echo "
bla" >> file1 &&
git commit --author "Old Line <ol@localhost>" -a -m file1.b &&
- # Back to foo and merge master
+ # Back to foo and merge main
git checkout foo &&
- if git merge master; then
+ if git merge main; then
echo needed conflict here
exit 1
else
@@ -44,8 +44,8 @@ Even more" > file2 &&
git rm file1 &&
git commit --author "M Result <mr@localhost>" -a -m merged &&
- # Back to master and change file1 again
- git checkout master &&
+ # Back to main and change file1 again
+ git checkout main &&
sed s/bla/foo/ <file1 >X &&
rm file1 &&
mv X file1 &&
@@ -53,7 +53,7 @@ Even more" > file2 &&
# Try to merge into foo again
git checkout foo &&
- if git merge master; then
+ if git merge main; then
echo needed conflict here
exit 1
else
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 6ce12ad6d8..a63945569f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -263,7 +263,7 @@ case "$TEST_NUMBER" in
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
;;
-[0-7]*)
+[0-8]*)
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
;;
--
gitgitgadget
next prev parent reply other threads:[~2020-11-17 16:15 UTC|newest]
Thread overview: 163+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 22:43 [PATCH 00/28] Use main as default branch name Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 01/28] t0060: preemptively adjust alignment Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 02/28] t[01]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 03/28] t2*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 04/28] t3[0-3]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 05/28] t3416: preemptively adjust alignment in a comment Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 06/28] t34*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 07/28] t3[5-9]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 08/28] t4*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 09/28] t5323: prepare centered comment for `master` -> `main` Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 10/28] t5[0-4]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 11/28] t5503: prepare aligned comment for replacing `master` with `main` Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 12/28] t550*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 13/28] t551*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 14/28] t55[23]*: " Johannes Schindelin via GitGitGadget
2020-11-13 10:02 ` Ævar Arnfjörð Bjarmason
2020-11-13 14:18 ` Johannes Schindelin
2020-11-16 20:07 ` Junio C Hamano
2020-11-12 22:43 ` [PATCH 15/28] t55[4-9]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 16/28] t5[6-9]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 17/28] t6[0-3]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 18/28] t64*: preemptively adjust alignment to prepare for `master` -> `main` Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 19/28] t6[4-9]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 20/28] t7[0-4]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 21/28] t7[5-9]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 22/28] t8*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 23/28] t9[0-4]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 24/28] t9[5-7]*: " Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 25/28] tests(git-p4): transition to the default branch name `main` Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 26/28] t99*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 27/28] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed Johannes Schindelin via GitGitGadget
2020-11-12 22:43 ` [PATCH 28/28] Change the default branch name to `main` Don Goodman-Wilson via GitGitGadget
2020-11-13 9:57 ` Ævar Arnfjörð Bjarmason
2020-11-13 14:09 ` Johannes Schindelin
2020-11-16 20:04 ` Junio C Hamano
2020-11-13 0:11 ` [PATCH 00/28] Use main as default branch name Felipe Contreras
2020-11-13 12:55 ` Ævar Arnfjörð Bjarmason
2020-11-13 14:22 ` Johannes Schindelin
2020-11-13 16:13 ` [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of) Ævar Arnfjörð Bjarmason
2020-11-13 19:14 ` Jeff King
2020-11-13 22:00 ` Johannes Schindelin
2020-11-13 22:39 ` Johannes Schindelin
2020-11-13 23:49 ` Ævar Arnfjörð Bjarmason
[not found] ` <nycvar.QRO.7.76.6.2011162118060.18437@tvgsbejvaqbjf.bet>
2020-11-18 13:32 ` Ævar Arnfjörð Bjarmason
2020-11-18 14:16 ` Felipe Contreras
2020-11-20 11:36 ` Ævar Arnfjörð Bjarmason
2020-11-20 16:00 ` Felipe Contreras
2020-11-18 15:56 ` Junio C Hamano
2020-11-19 9:32 ` Johannes Schindelin
2020-11-19 19:35 ` Junio C Hamano
2020-11-22 19:07 ` Johannes Schindelin
2020-11-19 10:46 ` Johannes Schindelin
2020-11-14 0:25 ` Felipe Contreras
2020-11-13 17:42 ` [PATCH 00/28] Use main as default branch name Felipe Contreras
2020-11-14 6:13 ` Junio C Hamano
2020-11-16 19:52 ` Junio C Hamano
2020-11-17 16:10 ` Johannes Schindelin
2020-11-17 19:09 ` Junio C Hamano
2020-11-18 20:58 ` Johannes Schindelin
2020-11-17 16:12 ` [PATCH v2 00/27] tests: use " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 01/27] t0060: preemptively adjust alignment Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 02/27] t[01]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 03/27] t2*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 04/27] t3[0-3]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 05/27] t3416: preemptively adjust alignment in a comment Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 06/27] t34*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 07/27] t3[5-9]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 08/27] t4*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 09/27] t5323: prepare centered comment for `master` -> `main` Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 10/27] t5[0-4]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 11/27] t5503: prepare aligned comment for replacing `master` with `main` Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 12/27] t550*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 13/27] t551*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 14/27] t55[23]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 15/27] t55[4-9]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 16/27] t5[6-9]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 17/27] t6[0-3]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 18/27] t64*: preemptively adjust alignment to prepare for `master` -> `main` Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 19/27] t6[4-9]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 20/27] t7[0-4]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 21/27] t7[5-9]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` Johannes Schindelin via GitGitGadget [this message]
2020-11-17 16:12 ` [PATCH v2 23/27] t9[0-4]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 24/27] t9[5-7]*: " Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 25/27] tests(git-p4): transition to the default branch name `main` Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 26/27] t99*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-17 16:12 ` [PATCH v2 27/27] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed Johannes Schindelin via GitGitGadget
2020-11-18 11:48 ` [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH Ævar Arnfjörð Bjarmason
2020-11-18 23:56 ` Johannes Schindelin
2020-11-19 19:30 ` Junio C Hamano
2020-11-20 13:09 ` Johannes Schindelin
2020-11-20 18:08 ` Junio C Hamano
2020-11-18 23:44 ` [PATCH v3 00/28] tests: use main as default branch name Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 01/28] tests: mark tests relying on the current default for `init.defaultBranch` Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 02/28] t0060: preemptively adjust alignment Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 03/28] t[01]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 04/28] t2*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 05/28] t3[0-3]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 06/28] t3416: preemptively adjust alignment in a comment Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 07/28] t34*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 08/28] t3[5-9]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 09/28] t4*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 10/28] t5323: prepare centered comment for `master` -> `main` Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 11/28] t5[0-4]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 12/28] t5503: prepare aligned comment for replacing `master` with `main` Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 13/28] t550*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 14/28] t551*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 15/28] t55[23]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 16/28] t55[4-9]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 17/28] t5[6-9]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 18/28] t6[0-3]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 19/28] t64*: preemptively adjust alignment to prepare for `master` -> `main` Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 20/28] t6[4-9]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 21/28] t7[0-4]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 22/28] t7[5-9]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 23/28] t8*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 24/28] t9[0-4]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 25/28] t9[5-7]*: " Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 26/28] tests(git-p4): transition to the default branch name `main` Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 27/28] t99*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget
2020-11-18 23:44 ` [PATCH v3 28/28] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed Johannes Schindelin via GitGitGadget
2020-11-19 23:35 ` [PATCH v3 00/28] tests: use main as default branch name Junio C Hamano
2020-11-17 20:48 ` [PATCH 00/28] Use " Eric W. Biederman
2020-11-17 22:47 ` Felipe Contreras
2020-11-17 23:33 ` Jeff King
2020-11-18 0:07 ` Junio C Hamano
2020-11-18 1:25 ` Jeff King
2020-11-18 2:40 ` Jonathan Nieder
2020-11-18 5:43 ` Junio C Hamano
2020-11-18 11:32 ` Johannes Schindelin
2020-11-18 15:43 ` Junio C Hamano
2020-11-19 9:22 ` Johannes Schindelin
2020-11-18 0:18 ` Felipe Contreras
2020-11-18 1:22 ` Jeff King
2020-11-18 1:45 ` Felipe Contreras
2020-11-18 2:06 ` Jeff King
2020-11-18 2:39 ` Jonathan Nieder
2020-11-18 10:12 ` Felipe Contreras
2020-11-18 9:04 ` Felipe Contreras
2020-11-17 22:55 ` Junio C Hamano
2020-11-17 23:16 ` Felipe Contreras
2020-11-18 0:10 ` Junio C Hamano
2020-11-18 0:51 ` Felipe Contreras
2020-11-18 23:45 ` Philip Oakley
2020-11-19 0:00 ` Johannes Schindelin
2020-11-19 0:30 ` Philip Oakley
2020-11-19 0:30 ` Peter Hadlaw
2020-11-19 0:44 ` Philip Oakley
2020-11-19 0:55 ` Peter Hadlaw
2020-11-19 1:51 ` Junio C Hamano
2020-11-19 10:35 ` Philip Oakley
2020-11-19 11:10 ` Sergey Organov
2020-11-19 11:50 ` Philip Oakley
2020-11-19 12:33 ` Sergey Organov
2020-11-21 23:01 ` Junio C Hamano
2020-11-22 10:21 ` Sergey Organov
2020-11-22 11:20 ` Philip Oakley
2020-11-22 13:23 ` Sergey Organov
2020-11-22 20:18 ` Philip Oakley
2020-11-22 21:56 ` Felipe Contreras
2020-11-22 23:54 ` Junio C Hamano
2020-11-18 2:56 ` Jonathan Nieder
2020-11-18 5:57 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cac0065c87e6acf1ed95ed5f24c1027048e7b6f.1605629549.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).