git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git describe shows old tag

From
D.dirtbikersteve . <stevemk14ebr@gmail.com>
Date
Sep 26, 2019, 20:46 UTC
Message-ID
<CAN-=hvFX+tN_pQHPBxo0pA90N03dO7pxHVbD79Es22mx30TdxQ@mail.gmail.com>

I believe there is a bug in git describe. When using the command `git describe –tags` an old tag version was returned. The repo had a lightweight tag at v0.6.1, which was correctly shown by `git tag` but did not get returned by `git describe –tags` OR `git describe –all`. The command `git for-each-ref --format="%(refname:short)" --sort=-authordate --count=1 refs/tags` worked correctly. Console logs:

λ git tag v0.1.0 v0.1.1 v0.1.10 v0.1.11 v0.1.12 v0.1.13 v0.1.14 v0.1.15 v0.1.16 v0.1.17 v0.1.18 v0.1.2 v0.1.3 v0.1.4 v0.1.5 v0.1.6 v0.1.7 v0.1.8 v0.1.9 v0.2.0 v0.2.1 v0.2.2 v0.2.3 v0.2.4 v0.2.5 v0.2.7 v0.2.8 v0.2.9 v0.3.0 v0.3.1 v0.3.2 v0.3.3 v0.3.4 v0.4.0 v0.4.1 v0.4.9 v0.5.0 v0.5.1 v0.5.10 v0.5.11 v0.5.12 v0.5.13 v0.5.14 v0.5.15 v0.5.16 v0.5.17 v0.5.18 v0.5.19 v0.5.2 v0.5.20 v0.5.21 v0.5.3 v0.5.4 v0.5.5 v0.5.6 v0.5.7 v0.5.8 v0.5.9 v0.6 v0.6.1

λ git describe --all tags/v0.5.20

λ git describe --all --debug describe HEAD tags/v0.5.20

λ git describe --all --debug describe HEAD tags/v0.5.20

λ git for-each-ref --format="%(refname:short)" --sort=-authordate --count=1 refs/tags v0.6.1

-Stephen Eckels
Message 1 of 1 in “Git describe shows old tag”
  1. dirtbikersteve .Sep 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.