Thread (4 messages) 4 messages, 4 authors, 2021-09-18

Re: Should `@` be really a valid git tag name?

flat view

From: Chris Torek <hidden>
Date: 2021-09-18 13:45:20

Possibly related (same subject, not in this thread)

I was in fact the commenter, and I wasn't saying
that it is a bug in check-ref-format, but rather that
since `@` by itself is forbidden, perhaps the creation
of a tag or branch named `@` should be forbidden.
Maybe it should even be forbidden as any component
part, in new names, although obviously we would
have to allow deleting existing names!

I knew this would be a bit of a hornet's nest though,

Chris

On Fri, Sep 17, 2021 at 9:37 PM Junio C Hamano [off-list ref] wrote:
Carlo Arenas [off-list ref] writes:
quoted
On Fri, Sep 17, 2021 at 7:12 AM [off-list ref] wrote:
quoted
A SO commenter pointed out, that git-check-ref-format forbids @ and
maybe I should report this as a potential bug. Is it?
a reference that is named "@" only is invalid, but refs/tags/@ is not.
;-)

"git check-ref-format master ; echo $?" would show that any single
level name is "forbidden", so probably the SO commenter (whatever
that is) was confused---it is not about @ at all.

In any case, a tag whose name is @ may be another source of
confusion in the modern world, after we added @ as a synonym to
HEAD.  I do not know, for example, offhand which between the HEAD or
that tag "git show @" would choose.  It makes sense to avoid it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help