git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Chris Torek <chris.torek@gmail.com>
Date
Sep 18, 2021, 13:45 UTC
Message-ID
<CAPx1GvdL4gNQhLwaF0useXXWzXXFRxZekuFEcSkyOOTniueFTg@mail.gmail.com>
In-Reply-To
<xmqq4kaihqjj.fsf@gitster.g>

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 <gitster@pobox.com> wrote:
Show 20 quoted lines
>
> Carlo Arenas <carenas@gmail.com> writes:
>
> > On Fri, Sep 17, 2021 at 7:12 AM <gitmailinglist.bentolor@xoxy.net> wrote:
> >>
> >> 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.
Previous: Carlo Marcelo Arenas Belón
Message 10 of 10 in “Should `@` be really a valid git tag name?”
  1. gitmailinglist.bentolor@xoxy.netSep 17, 2021
  2. Carlo ArenasSep 17, 2021
  3. Junio C HamanoSep 17, 2021
  4. Jeff KingSep 17, 2021
  5. Carlo Marcelo Arenas BelónSep 17, 2021
  6. Junio C HamanoSep 17, 2021
  7. Carlo ArenasSep 18, 2021
  8. Junio C HamanoSep 18, 2021
  9. Carlo Marcelo Arenas BelónSep 18, 2021
  10. Chris TorekSep 18, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.