Subject: Re: [PATCH 4/4] tag: "git tag" refuses to use HEAD as a tagname

From: Junio C Hamano <[email-masked]>
Date: Tue, 03 Dec 2024 10:30:15 +0900

shejialuo <[email-masked]> writes:

>>  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.