All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>, Taylor Blau <me@ttaylorr.com>
Subject: [PATCH 2/8] t5619: use fully qualified refname for branch
Date: Mon, 29 Apr 2024 04:21:28 -0400	[thread overview]
Message-ID: <20240429082128.GA233423@coredump.intra.peff.net> (raw)

We use test_commit_bulk to update the ref "main". But without
qualification, that is really creating ".git/main", not an actual branch
in "refs/heads/".

In the end it does not really matter, because after creating "main" its
only purpose is for us to point HEAD to its same commit id. And that
works regardless of how we named it (the later call to update-ref just
calls it "main", but that is OK; we are resolving it to an oid there, so
our DWIM logic will find it in "refs/heads/").

Since it seems like going outside of "refs/" was accidental here, let's
do the more normal thing and just use a branch. That makes the test less
confusing and will future proof us against ref updates becoming more
picky.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t5619-clone-local-ambiguous-transport.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5619-clone-local-ambiguous-transport.sh b/t/t5619-clone-local-ambiguous-transport.sh
index cce62bf78d..70db437496 100755
--- a/t/t5619-clone-local-ambiguous-transport.sh
+++ b/t/t5619-clone-local-ambiguous-transport.sh
@@ -21,7 +21,7 @@ test_expect_success 'setup' '
 	echo "secret" >sensitive/secret &&
 
 	git init --bare "$REPO" &&
-	test_commit_bulk -C "$REPO" --ref=main 1 &&
+	test_commit_bulk -C "$REPO" --ref=refs/heads/main 1 &&
 
 	git -C "$REPO" update-ref HEAD main &&
 	git -C "$REPO" update-server-info &&
-- 
2.45.0.rc1.416.gbe2a76c799


                 reply	other threads:[~2024-04-29  8:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240429082128.GA233423@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=ps@pks.im \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.