From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH v2 2/2] tests: avoid using the branch name `main`
Date: Thu, 08 Oct 2020 10:13:47 +0000 [thread overview]
Message-ID: <b187571778c2059b853c33637b4e59c5267125f0.1602152027.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.743.v2.git.1602152027.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
In the near future, we want to change Git's default branch name to
`main`. In preparation for that, stop using it as a branch name in the
test suite. Replace that branch name by `topic`, the same name we used
to rename variations of `master` in b6211b89eb3 (tests: avoid variations
of the `master` branch name, 2020-09-26).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
t/t6012-rev-list-simplify.sh | 8 ++++----
t/t6400-merge-df.sh | 8 ++++----
t/t6409-merge-subtree.sh | 12 ++++++------
t/t6430-merge-recursive.sh | 4 ++--
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
index b6fa43ace0..7fc10f8593 100755
--- a/t/t6012-rev-list-simplify.sh
+++ b/t/t6012-rev-list-simplify.sh
@@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
test_expect_success 'rebuild repo' '
rm -rf .git * &&
git init &&
- git switch -c main &&
+ git switch -c topic &&
echo base >file &&
git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' '
git add file &&
test_commit B &&
- git switch main &&
+ git switch topic &&
test_must_fail git merge -m "M" B &&
echo A >file &&
echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' '
git merge -m R -Xtheirs X &&
note R &&
- git switch main &&
+ git switch topic &&
git merge -m N R &&
note N &&
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' '
git add z &&
test_commit Z &&
- git switch main &&
+ git switch topic &&
git merge -m O Z &&
note O &&
diff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh
index 400a4cd139..f1b84617af 100755
--- a/t/t6400-merge-df.sh
+++ b/t/t6400-merge-df.sh
@@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
git add . &&
git commit -m initial &&
- git branch main &&
+ git branch topic &&
git branch other &&
git checkout other &&
@@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
git add -u &&
git commit -m other &&
- git checkout main &&
- echo main >foo/bar/baz &&
+ git checkout topic &&
+ echo topic >foo/bar/baz &&
git add -u &&
- git commit -m main &&
+ git commit -m topic &&
git merge other &&
git ls-files -s >out &&
diff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh
index 793f0c8bf3..8b11e00ded 100755
--- a/t/t6409-merge-subtree.sh
+++ b/t/t6409-merge-subtree.sh
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' '
test_commit foo
'
-test_expect_success 'setup branch main' '
- git checkout -b main master &&
+test_expect_success 'setup topic branch' '
+ git checkout -b topic master &&
git merge -s ours --no-commit --allow-unrelated-histories sub &&
git read-tree --prefix=dir/ -u sub &&
- git commit -m "initial merge of sub into main" &&
+ git commit -m "initial merge of sub into topic" &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
'
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' '
test_commit bar
'
-test_expect_success 'update branch main' '
- git checkout main &&
- git merge -s subtree sub -m "second merge of sub into main" &&
+test_expect_success 'update topic branch' '
+ git checkout topic &&
+ git merge -s subtree sub -m "second merge of sub into topic" &&
test_path_is_file dir/bar.t &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
diff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh
index d48d211a95..a328260d42 100755
--- a/t/t6430-merge-recursive.sh
+++ b/t/t6430-merge-recursive.sh
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
test_expect_success 'merging with triple rename across D/F conflict' '
git reset --hard HEAD &&
- git checkout -b main &&
+ git checkout -b topic &&
git rm -rf . &&
echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' '
test_tick &&
git commit -a -m changesimplefile &&
- git checkout main &&
+ git checkout topic &&
git rm sub1 &&
git mv sub2 sub1 &&
test_tick &&
--
gitgitgadget
prev parent reply other threads:[~2020-10-08 10:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 8:56 [PATCH 0/2] Avoid main as branch name in the test suite Johannes Schindelin via GitGitGadget
2020-10-05 8:56 ` [PATCH 1/2] t1415: avoid using `main` as ref name Johannes Schindelin via GitGitGadget
2020-10-05 9:54 ` Jonathan Nieder
2020-10-08 7:56 ` Johannes Schindelin
2020-10-05 8:56 ` [PATCH 2/2] tests: avoid using the branch name `main` Johannes Schindelin via GitGitGadget
2020-10-05 9:59 ` Jonathan Nieder
2020-10-08 8:05 ` Johannes Schindelin
2020-10-08 18:15 ` Derrick Stolee
2020-10-08 10:13 ` [PATCH v2 0/2] Avoid main as branch name in the test suite Johannes Schindelin via GitGitGadget
2020-10-08 10:13 ` [PATCH v2 1/2] t1415: avoid using `main` as ref name Johannes Schindelin via GitGitGadget
2020-10-08 10:13 ` Johannes Schindelin via GitGitGadget [this message]
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=b187571778c2059b853c33637b4e59c5267125f0.1602152027.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/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).