git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 1/2] t1415: avoid using `main` as ref name
Date: Mon, 05 Oct 2020 08:56:35 +0000	[thread overview]
Message-ID: <d3f7b39a2f11f4b05195f62190f75c84475c237d.1601888196.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.743.git.1601888196.gitgitgadget@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

In preparation for a patch series that will change the fall-back for
`init.defaultBranch` to `main`, let's not use `main` as ref name in this
test script.

Since we already use the name "second" for a secondary worktree that is
created in this test, let's use the name "first" for those refs instead.

While at it, adjust the test titles where "repo" was used by mistake
instead of the term "worktree".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t1415-worktree-refs.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/t/t1415-worktree-refs.sh b/t/t1415-worktree-refs.sh
index bb2c7572a3..7ab91241ab 100755
--- a/t/t1415-worktree-refs.sh
+++ b/t/t1415-worktree-refs.sh
@@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' '
 	test_cmp expected actual.wt2
 '
 
-test_expect_success 'for-each-ref from main repo' '
+test_expect_success 'for-each-ref from main worktree' '
 	mkdir fer1 &&
 	git -C fer1 init repo &&
 	test_commit -C fer1/repo initial &&
 	git -C fer1/repo worktree add ../second &&
-	git -C fer1/repo update-ref refs/bisect/main HEAD &&
-	git -C fer1/repo update-ref refs/rewritten/main HEAD &&
-	git -C fer1/repo update-ref refs/worktree/main HEAD &&
-	git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&
+	git -C fer1/repo update-ref refs/bisect/first HEAD &&
+	git -C fer1/repo update-ref refs/rewritten/first HEAD &&
+	git -C fer1/repo update-ref refs/worktree/first HEAD &&
+	git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual &&
 	cat >expected <<-\EOF &&
-	refs/bisect/main
-	refs/rewritten/main
-	refs/worktree/main
+	refs/bisect/first
+	refs/rewritten/first
+	refs/worktree/first
 	EOF
 	test_cmp expected actual
 '
 
-test_expect_success 'for-each-ref from linked repo' '
+test_expect_success 'for-each-ref from linked worktree' '
 	mkdir fer2 &&
 	git -C fer2 init repo &&
 	test_commit -C fer2/repo initial &&
-- 
gitgitgadget


  reply	other threads:[~2020-10-05  8:56 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 ` Johannes Schindelin via GitGitGadget [this message]
2020-10-05  9:54   ` [PATCH 1/2] t1415: avoid using `main` as ref name 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   ` [PATCH v2 2/2] tests: avoid using the branch name `main` Johannes Schindelin via GitGitGadget

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3f7b39a2f11f4b05195f62190f75c84475c237d.1601888196.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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.
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 NNTP newsgroup(s).