git-describe --tags warning: 'X' is really 'Y' here

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
    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@xxxxxxxxxxxxxx     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux