From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@jowil.de, git@vger.kernel.org
Subject: Re: git tag -a HEAD leads to ambiguous branch name
Date: Mon, 02 Dec 2024 13:38:20 +0900 [thread overview]
Message-ID: <xmqqwmgiits3.fsf@gitster.g> (raw)
In-Reply-To: <20241201224408.GJ145938@coredump.intra.peff.net> (Jeff King's message of "Sun, 1 Dec 2024 17:44:08 -0500")
Jeff King <peff@peff.net> writes:
> But I don't know about this. I thought when we outlawed "git branch
> HEAD" that it was quite intentional _not_ to forbid these names at the
> lowest level in order to retain backwards compatibility. They are just
> about preventing common UI mistakes.
Yeah, I think this is a sensible way to think about it.
>> There is a dubious test in t5604 that expects you can create such a
>> tag. t5604.22 wants to create one:
>>
>> test_expect_success 'clone with reference from a tagged repository' '
>> (
>> cd A && git tag -a -m tagged HEAD
>> ) &&
>> git clone --reference=A A I
>> '
>>
>> and t5604.24 wants to use it.
>
> Weird. Comes from 09116a1c31 (refs: loosen over-strict "format" check,
> 2011-11-16). I don't see any reason it could not just be "foo".
Hmph, yeah, reverting the code change of 09116a1c31 and then using
'foo' instead of 'HEAD' fails the test exactly the same way.
prev parent reply other threads:[~2024-12-02 4:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 0:14 git tag -a HEAD leads to ambiguous branch name git
2024-11-27 14:27 ` Jeff King
2024-11-27 23:30 ` Junio C Hamano
2024-12-01 22:44 ` Jeff King
2024-12-02 4:38 ` Junio C Hamano [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwmgiits3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@jowil.de \
--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.
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).