{"thread":{"id":"61380","subject":"[PATCH 2/8] t5619: use fully qualified refname for branch","startedAt":"2024-04-29T08:21:30Z","lastAt":"2024-04-29T08:21:30Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"493613","messageId":"20240429082128.GA233423@coredump.intra.peff.net","threadId":"61380","inReplyTo":null,"subject":"[PATCH 2/8] t5619: use fully qualified refname for branch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-04-29T08:21:28Z","receivedAt":"2024-04-29T08:21:30Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We use test_commit_bulk to update the ref \"main\". But without\nqualification, that is really creating \".git/main\", not an actual branch\nin \"refs/heads/\".\n\nIn the end it does not really matter, because after creating \"main\" its\nonly purpose is for us to point HEAD to its same commit id. And that\nworks regardless of how we named it (the later call to update-ref just\ncalls it \"main\", but that is OK; we are resolving it to an oid there, so\nour DWIM logic will find it in \"refs/heads/\").\n\nSince it seems like going outside of \"refs/\" was accidental here, let's\ndo the more normal thing and just use a branch. That makes the test less\nconfusing and will future proof us against ref updates becoming more\npicky.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/t5619-clone-local-ambiguous-transport.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5619-clone-local-ambiguous-transport.sh b/t/t5619-clone-local-ambiguous-transport.sh\nindex cce62bf78d..70db437496 100755\n--- a/t/t5619-clone-local-ambiguous-transport.sh\n+++ b/t/t5619-clone-local-ambiguous-transport.sh\n@@ -21,7 +21,7 @@ test_expect_success 'setup' '\n \techo \"secret\" >sensitive/secret &&\n \n \tgit init --bare \"$REPO\" &&\n-\ttest_commit_bulk -C \"$REPO\" --ref=main 1 &&\n+\ttest_commit_bulk -C \"$REPO\" --ref=refs/heads/main 1 &&\n \n \tgit -C \"$REPO\" update-ref HEAD main &&\n \tgit -C \"$REPO\" update-server-info &&\n-- \n2.45.0.rc1.416.gbe2a76c799\n\n"}]}