mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: Jeff King <>
Cc: Matheus Tavares Bernardino <>,
	Roland Hieber <>, git <>
Subject: Re: git-describe --tags warning: 'X' is really 'Y' here
Date: Fri, 14 Feb 2020 08:57:29 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Jeff King's message of "Fri, 14 Feb 2020 01:53:52 -0500")

Jeff King <> writes:

>> >     gcc (master) $ git describe --tags --abbrev=0
>> >     warning: tag 'gcc_9_2_0_release' is really 'releases/gcc-9.2.0' here
>> >     gcc_9_2_0_release
>> >
>> > It took me a while to find out what the warning means, because
>> > 'gcc_9_2_0_release' is not in $(git tag -l), and it cannot be used as a
>> > ref either:
>> [...]
>> It seems that the commit which added the output message you got is
>> 212945d ("Teach git-describe to verify annotated tag names before
>> output", 2008-02-28) [1]. As the commit message states, the warning is
>> emitted when a tag is locally stored under a different name from the
>> one it was originally created (being the former the one you will want
>> to use at `git show`).
> Yeah, I think that is what's going on with that warning, but there's a
> weird thing about the actual stdout output. We see a tag object whose
> name doesn't match the ref. What's the "real" name of that tag? Is it
> the name in the object, and the ref is wrong? Or is the ref correct, and
> the object is wrong?
> You could get pretty philosophical there, I think, but it seems slightly
> annoying that we print the name from the object to stdout, when one
> cannot then use that name to access the tag in any way.
> I.e., I think it might be reasonable to issue that warning but then
> print "releases/gcc-9.2.0" instead.

I agree.  What the tag creator, whom you treat as more authoritative
than yourself, called "gcc_9_2_0_release", is stored at a wrong
place by you and you have to call it "releases/gcc-9.2.0".  So the
right way (at least philosophically) to phrase the warning message
should reflect that a bit better, perhaps

  warning: tag 'releases/gcc-9.2.0' is externally known as 'gcc_9_2_0_release'

to hint that 'releases/gcc-9.2.0' is merely how you name it and the
real name of the tag itself is gcc_9_2_0_release, although in
practice everybody would be calling the tag with the same wrong
name, as that is how cloning and fetching of tags work ;-).

  reply	other threads:[~2020-02-14 16:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 14:13 git-describe --tags warning: 'X' is really 'Y' here Roland Hieber
2020-02-05 17:15 ` Matheus Tavares Bernardino
2020-02-14  6:53   ` Jeff King
2020-02-14 16:57     ` Junio C Hamano [this message]
2020-02-15 21:34       ` [PATCH] describe: output tag's ref instead of embedded name Matheus Tavares
2020-02-16  6:51         ` Jeff King
2020-02-18 19:31           ` Junio C Hamano
2020-02-18 19:54             ` Jeff King
2020-02-18 23:05               ` Junio C Hamano
2020-02-18 23:28                 ` Junio C Hamano
2020-02-19  1:57                   ` Jeff King
2020-02-19  3:22                     ` Junio C Hamano
2020-02-19  3:56                       ` Jeff King
2020-02-19 11:14                         ` Junio C Hamano
2020-02-20 11:25                           ` Jeff King
2020-02-20 17:34                             ` Junio C Hamano
2020-02-20 22:19                               ` Matheus Tavares Bernardino
2020-02-20 22:59                                 ` Junio C Hamano
2020-02-21  1:33                                   ` Matheus Tavares
2020-02-21  2:05                                     ` Junio C Hamano
2020-02-21  6:00                                       ` Jeff King
2020-02-21  5:58                               ` Jeff King
2020-02-19 10:08                       ` Roland Hieber

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).