Re: Antw: Re: Q: git describe --always --tags .. gives "warning: tag 'tag1' is really 'tag2' here"

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

 



On Mon, Jun 03, 2019 at 08:06:54AM +0200, Ulrich Windl wrote:

> > Imagine you have only v1.0.0 (which is with known issues) but
> > somebody did "cd .git/refs/tags && mv v1.0.0 v1.1.0" in an attempt
> > to fool you.  The fact that your 'master' is a bit ahead of the
> > commit that was tagged with the tag object (which is v1.0.0 but
> > pretending to be v1.1.0) can be seen with "describe", but the
> > command is careful enough to use the real version number
> > (i.e. v1.0.0) and not the refname (i.e. v1.1.0).
> 
> Still I'm missing a verbose version of "git tag" that shows the commit IDs
> along with the tag names. Unfortunately "-v" is not "--verbose" but "--verify"
> (as opposed to "git remote" for example).

You can use for-each-ref format strings with "git tag" these days. E.g.:

  git tag --list --format='%(refname:short) %(tag) %(*objecttype) %(*objectname)'

will show each tag with its refname and tag-object name (which generally
match, but would not in the case discussed here), and then the type and
oid of the pointed-to thing (the "*" is a "dereference").

-Peff



[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