I was just going through the documentation for module maintainers on the "Git instructions" tab, when I noticed it says `git tag TAGNAME` instead of the `git tag -a TAGNAME`. I'm quite sure this was discussed by the team when going about the migration (I saw a reference here - http://drupal.org/node/1069654), but I couldn't find the reason. So...
Git tag by default does not create a "tag object", it only creates a lightweight tag, which is just a pointer to a commit, very much like a branch which doesn't ever move. However, annotated tags (git tag -a TAGNAME) are actual tag objects. They include information about tagger, a tag message (and if you add a `-s` switch, a cryptographic sign). This is what almost every git-using project does.
How does a real tag help? For one, it saves both tagger info and info for the commit it points to. So if I "real" tag my project, `git show TAGNAME` will tell me it was tagged by Pratul Kalia and that the commit it points to was by Foo Bar (both contributions preserved). Real tags also work with git describe, lightweight ones don't.
References:
http://www.rockstarprogrammer.org/post/2008/oct/16/git-tag-does-wrong-th...
http://learn.github.com/p/tagging.html#creating_tags
Updated: real tags don't get pushed automatically either, removed that point.
Comments
Comment #1
marvil07 commentedI would say +1 for annotated tags, and I can confirm git log parser can read them ;-)
update: tag annotated message is not stored on tables for now :-(
Comment #2
dwwThere's no bug here. The whole infrastructure works fine with either kind of tag. We could certainly update the documentation to recommend annotated tags and explain the benefits. You should have edit access to most or all of the documentation, so feel free to make improvements.
See also #1023638: Use tag annotation for the default release node body. for other thoughts on annotated tags.
Cheers,
-Derek
Comment #3
dwwHrm, in fact #1069654: docs vs git instructions: simple or annotated tags?
Comment #4
lut4rp commentedIssue closed, but for clarification `git push` does NOT push annotated or signed tags automatically either. My bad.