Re: [PATCH 4/4] tag: "git tag" refuses to use HEAD as a tagname
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 3, 2024, 01:30 UTC
- Message-ID
- <xmqqy10xft94.fsf@gitster.g>
- In-Reply-To
- <Z02voaSNYRciv38z@ArchLinux>
shejialuo <shejialuo@gmail.com> writes:
Show 8 quoted lines
>> int check_tag_ref(struct strbuf *sb, const char *name)
>> {
>> - if (name[0] == '-')
>> + if (name[0] == '-' || !strcmp(name, "HEAD"))
>
> I am wondering whether we should also update "check_refname_format"
> function to report "refs/heads/HEAD" and "refs/tags/HEAD" is bad ref
> name.Check the list archive for the past few days; it was considered and rejected.
Thanks.