threads / discuss / 12718

git-describe only works on full tags

Subject: git-describe only works on full tags

## tl;dr

2 messages between Mar 17, 2008 and Mar 17, 2008.

replies: 1people: 2as markdown or json

Jan Engelhardt· Mar 17, 2008, 00:41 UTC · lore
Hi,

For some reason, git-describe only prints a description relative to the last tag that was a tag object (and not just a ref). This is kinda a bug to me, what do others think?

$ git-rev-list --all 0d00ac11e0927e6d50d565a30344a00ce1f6b0e7 c5137b6f2f0c7b6715c9508bdaeb464da93d036a 5afc6395e0051d1bb1d37f17592a5eb7f4ac6f2d $ git-tag v0.1 5afc6395e0051d1bb1d37f17592a5eb7f4ac6f2d $ git-describe fatal: cannot describe '0d00ac11e0927e6d50d565a30344a00ce1f6b0e7' $ git-tag -m "0.2" v0.2 c5137b6f2f0c7b6715c9508bdaeb464da93d036a $ git-describe v0.2-1-g0d00ac1 $ git-tag v0.3 0d00ac11e0927e6d50d565a30344a00ce1f6b0e7 $ git-describe v0.2-1-g0d00ac1 $ git-tag -f -m "0.3" v0.3 0d00ac11e0927e6d50d565a30344a00ce1f6b0e7 $ git-describe v0.3

Junio C Hamano· Mar 17, 2008, 02:13 UTC · re: Jan Engelhardt · lore

Re: git-describe only works on full tags

Jan Engelhardt <jengelh@computergmbh.de> writes:
> For some reason, git-describe only prints a description relative to 
> the last tag that was a tag object (and not just a ref).
> This is kinda a bug to me, what do others think?

There is an option to tell git-describe to allow using non annotated tags, but that is not a defult.

This is a very deliberate design decision. Annotated tags are meant for public consumption, but lightweight tags are often used to locally mark points that are interesting during this current development session (e.g. "I am trying to improve by first breaking and then enhancing, and this one was the last-known working one"), and it is mighty annoying if such a tag is used in describe output.

← back to recent threads