Skip to content

Commit

Permalink
contrib: make commit formatting rules clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinandyb committed Jan 30, 2023
1 parent 022d14a commit a15f2c0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,26 @@ PR without a merge commit. This means that

Please follow these general rules (adopted somewhat from the aerc contribution guidelines):

- Limit the first line (title) of the commit message to 60 characters.
- Use a short prefix for the commit title for readability with `git log
--oneline`. Do not use the `fix:` nor `feature:` prefixes. See recent commits
for inspiration.
- Limit the first line (title) of the commit message to 60 characters. Leave an
- empty space between the title and the body of the commit. Use a short prefix
- for the commit title for readability with `git log --oneline`. Do not use the
`fix:` nor `feature:` prefixes. See recent commits for inspiration.
- Only use lower case letters for the commit title except when quoting symbols
or known acronyms.
- Use the body of the commit message to actually explain what your patch does
and why it is useful. Even if your patch is a one line fix, the description
is not limited in length and may span over multiple paragraphs. Use proper
English syntax, grammar and punctuation.
- Address only one issue/topic per commit.
- Describe your changes in imperative mood, e.g. *"make xyzzy do frotz"*
English syntax, grammar and punctuation. Make sure the body of the commit is
hard wrapped at 72 characters.
- Address only one issue/topic per commit. Describe your changes in imperative
- mood, e.g. *"make xyzzy do frotz"*
instead of *"[This patch] makes xyzzy do frotz"* or *"[I] changed xyzzy to do
frotz"*, as if you are giving orders to the codebase to change its behaviour.
- If you are fixing an issue, add a `Fixes: #xxx` trailer with the issue id.
- If you are fixing a regression introduced by another commit, add a `Fixes:`
trailer with the commit id and its title.
- When in doubt, follow the format and layout of the recent existing commits (well, at least the later ones :)).
- When in doubt, follow the format and layout of the recent existing commits
- (well, at least the later ones :)).

There is a great reference for commit messages in the
[Linux kernel documentation](https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes) and on [tpope's blog](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
Expand Down

0 comments on commit a15f2c0

Please sign in to comment.