You can disable it, but you really shouldn't. A near-universal1 git convention is to use blank lines to separate paragraphs, including separating the commit summary from the extended description. This is recommended in the man
page and online documentation for git commit
:
The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git.
One place you'll notice this is magit-log-current
(and the other magit log functions), where all lines up to the first blank line will be included (just like in git log --oneline
).
But note that other tools, including GitHub, do not include the additional lines in the summary. Therefore, limiting the summary to one line and leaving the second line blank seems to be the best style.
To answer your question, though, if you really want to turn off the warning, just remove non-empty-second-line
from the git-commit-style-convention-checks
list.
(setq git-commit-style-convention-checks
(remove 'non-empty-second-line git-commit-style-convention-checks))
This also works, but potentially clobbers other settings as well:
(setq git-commit-style-convention-checks nil)
1 While I'm not going to go so far as to analyze every commit on GitHub, I'll note that every commit style I found by searching "git commit style" (on both Google and DuckDuckGo includes this recommendation (except for one that only talked about using emoji in the summary and didn't mention the description at all).