Start with a very slightly modified version of the SVN commit template.
This should be updated to add parts of the default Git commit message
template (such as the '#' will be ignored, Date:, On branch <branch>,
Changes to be committed, etc.) and could be further updated to have a
corresponding commit-message hook that checks for invalid metadata, such
as uncommented but empty metadata fields.
Details
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Open for discussion as a starting point.
tools/tools/git/hooks/prepare-commit-msg | ||
---|---|---|
3โ10 | Delete this comment |
tools/tools/git/hooks/prepare-commit-msg | ||
---|---|---|
22 | In the Git WG we discussed changing these to follow the more typical (in the Git world) hyphenated approach - Submitted-by: etc. |
tools/tools/git/hooks/prepare-commit-msg | ||
---|---|---|
22 | Since we are using git now, maybe we should suggest that patches submitted by other people set the commit author metadata instead of using submitted by metadata? Do we want to also include Co-authored-by: in this list? This is parsed by github+gitlab and will be displayed in the UI. |
Re: hyphenated metadata attribute names โ I'd just keep our annotations the same as they are now. If we were starting from scratch as a git project, sure, we should adopt the common git scheme. But the annotations are not special in git (just part of the commit message), and any FreeBSD tooling has to understand our previous annotations anyway.
That's a fair point. We might adopt Signed-off-by: but anyway the general approach is to keep things as they are as much as possible in the first phase of the transition.
tools/tools/git/hooks/prepare-commit-msg | ||
---|---|---|
22 |
Yes, we'll definitely want to start preserving author metadata and Submitted by will become uncommon.
Yeah, we should. I'd like to start with the trivial translation from the svn world, and have a history of the changes that we've made from svn->git |
tools/tools/git/hooks/prepare-commit-msg | ||
---|---|---|
22 | We will still get patches via e-mail that aren't full-fledged git commits, and for those submitted by will still be relevant. I do think for full-fledged git commits from others, we will definitely use the existing metadata. | |
39 | Do we want this to be 72 instead of 76 now per your other doc? | |
51 | Do we want this to say something like "https://github.com/freebsd/<repo>/pull/###" to allow for the future freebsd-src.git mirror as well as freebsd-doc and freebsd-ports? |