From 664c47ff45d9144d1a31bd1c0a04100790469d4b Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Tue, 28 Mar 2017 12:45:15 -0700 Subject: [PATCH] Include commit message format in contributing guidelines Add the need to have a commit message with a specific format to the contributing guidelines. Requires-builders: None Signed-off-by: Giuseppe Di Natale --- .github/CONTRIBUTING.md | 29 +++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 1 + 2 files changed, 30 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a7d2bd4d700f..411993b251a7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,6 +24,7 @@ started?](#what-should-i-know-before-i-get-started) [Style Guides](#style-guides) * [Coding Conventions](#coding-conventions) + * [Commit Message Format](#commit-message-format) Helpful resources @@ -117,6 +118,8 @@ feature needed? What problem does it solve? without conflicts. * Please attempt to limit pull requests to a single commit which resolves one specific issue. +* Make sure your commit messages are in the correct format. See the +[Commit Message Format](#commit-message-format) section for more information. * When updating a pull request squash multiple commits by performing a [rebase](https://git-scm.com/docs/git-rebase) (squash). * For large pull requests consider structuring your changes as a stack of @@ -150,3 +153,29 @@ to verify ZFS is behaving as intended. We currently use [C Style and Coding Standards for SunOS](http://www.cis.upenn.edu/%7Elee/06cse480/data/cstyle.ms.pdf) as our coding convention. + +### Commit Message Format +Commit messages must meet the following guidelines: +* In 50 characters or less, provide a summary of the change as the +first line in the commit message. +* A body which provides a description of the change. If necessary, +please summarize important information such as why the proposed +approach was chosen or a brief description of the bug you are resolving. +Each line of the body must be 70 characters or less. +* The last line must be a `Signed-off-by:` line with the developer's +name followed by their Github ID or email. + +Git can append the `Signed-off-by` line to your commit messages. Simply +provide the `-s` or `--signoff` option when performing a `git commit`. +An example commit message is below. + +``` +This line is a brief summary of your change + +Please provide at least a couple sentences describing the +change. If necessary, please summarize decisions such as +why the proposed approach was chosen or what bug you are +attempting to solve. + +Signed-off-by: Contributor +``` diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7c11a46da647..7376961fa296 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -29,4 +29,5 @@ - [ ] I have read the **CONTRIBUTING** document. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. +- [ ] All commits have a `Signed-off-by`. - [ ] Change has been approved by a ZFS on Linux member.