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

Reply via email to