diff options
author | BenoƮt Cortier | 2022-09-07 20:29:41 +0000 |
---|---|---|
committer | GitHub | 2022-09-07 20:29:41 +0000 |
commit | 16ce036bdf3a7899d14d62bc46bbc9a8b5fa99e3 (patch) | |
tree | 2fda5e51d90680c12ec73fcd1ebd55cd124e3946 | |
parent | 5b1113766d5363c2e434ab596fcca64a1c707a55 (diff) |
Add good default rulers when editing git messages (#3738)
Around 50 columns for the summary is good because it is often used as
heading or as subject in emails. 72 columns for the body is generally
good because some tools do not wrap long lines (`git log` with pager
`less` is a good example). Helix's `:reflow` command is really good to
help with the second point.
Linux kernel documentation says:
> For these reasons, the ``summary`` must be no more than 70-75
> characters, and it must describe both what the patch changes, as well
> as why the patch might be necessary. It is challenging to be both
> succinct and descriptive, but that is what a well-written summary
> should do.
Source:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n627
tpope:
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Commit message style guide for Git:
https://commit.style/
-rw-r--r-- | languages.toml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/languages.toml b/languages.toml index 38d9cb55..c7bc982d 100644 --- a/languages.toml +++ b/languages.toml @@ -972,6 +972,8 @@ roots = [] file-types = ["COMMIT_EDITMSG"] comment-token = "#" indent = { tab-width = 2, unit = " " } +rulers = [50, 72] +max-line-length = 72 [[grammar]] name = "git-commit" |