As seen in this answer, a git annotated tag has several properties, e.g.
> git cat-file -p v0.1
object 5cf4de319291579d4416da8e0eba8a2973f8b0cf
type commit
tag v0.1
tagger JDB <jd@domain.com> 1521058797 -0400
Version 0.1-beat
The first two properties give the SHA1 and type of the target object that the tag is pointing to. The third property gives the tag's name, v0.1
.
But this tag is represented as a file .git/refs/tags/v1.0
. So we already have a way to map from the string v0.1
to the tag object and its properties.
Why would we need the tag object to also include the tag name in its properties? Branches don't store their names. Commits objects don't store their SHA1's. Is there some situation where you'd have a reference to a tag but not to its name?