bsdimp / freebsd-git-docs

Draft copies of the FreeBSD git transition documents
46 stars 33 forks source link

vendor.md: Annotated tags suggestion #65

Open cemeyer opened 3 years ago

cemeyer commented 3 years ago

Another suggestion for creating annotated tags. Current text:

It's also important to create an annotated tag, otherwise the push will be rejected. Only annotated tags are allowed to be pushed.

It isn't clear why we would want annotated tags in git, nor what the developer's tag message should include. The text we've historically used in SVN is something like "Tag [import of] 1.2.3.4." But I'm not sure there's any reason for this in git — it's pretty clear what the plain tag vendor/foo/1.2.3.4commit (with message "Import 1.2.3.4").

Suggested action: either clarify what message should be used, or drop the annotated tags requirement (the latter is more of a policy change; feel free to close this issue if we want to drive that through git WG instead). Clarifying text would be something like: git tag -a vendor/NetBSD/mtree/20201211 -m "Tag mtree 20201211" in the example workflow, or adding a sentence to the existing text:

It's also important to create an annotated tag, otherwise the push will be rejected. Only annotated tags are allowed to be pushed. For our mtree example, that might be "Tag NetBSD/mtree 20201211."

Thanks!

bsdimp commented 3 years ago

annotated tags are required so we can avoid accidental pushes of tags. --follow-tags only will push annotated tags. I'll add a note about that.

I'll also add a note about what to put in the commit message. That's a good suggestion that's obvious in hindsight.