git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-describe --tags warning: 'X' is really 'Y' here
@ 2020-02-05 14:13 Roland Hieber
  2020-02-05 17:15 ` Matheus Tavares Bernardino
  0 siblings, 1 reply; 23+ messages in thread
From: Roland Hieber @ 2020-02-05 14:13 UTC (permalink / raw)
  To: git

Hi,

I'm working with the GCC Git repo [0] (which was apparently recently
converted from SVN [1]), and I'm trying to find out the most recent tag.
So on the master branch I do:

    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:

    gcc (master) $ git show gcc_9_2_0_release
    fatal: ambiguous argument 'gcc_9_2_0_release': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'

That name is in the tag itself:

    gcc (master) $ git show releases/gcc-9.2.0 | head -n3
    tag gcc_9_2_0_release
    Tagger: Jakub Jelinek <jakub@gcc.gnu.org>
    Date:   2019-08-12 09:38:59

So my question is: is it the intended behaviour of 'git-describe --tags'
that it outputs tag names that cannot be used as a ref? If so, what is a
good other way to find out the most recent tag?

[0]: git://gcc.gnu.org/git/gcc.git,
     https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git
[1]: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=tag;h=f5b196de86fde51578354ff5f98be6d9c397c8fe

Thanks,
-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-02-21  6:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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 NNTP newsgroup(s).