Git grumpy: Torvalds complains of passive voice in merge commit messages

AnActOfCreation@programming.dev to Programming@programming.dev – 188 points –
Git grumpy: Torvalds complains of passive voice in merge commit messages
neowin.net

Linus Torvalds expressed frustration over the use of passive voice in merge commit messages, preferring active and imperative language instead.

He provided an example of how commit messages should be rewritten for clarity and consistency across the project.

Torvalds noted that while it's not a major issue, it does add extra work when he has to rewrite messages to match his preference.

53

You are viewing a single comment

And here it is in the kernel contribution documentation.

Simple example:

  • bad: Added foo interface.
  • good: Add foo interface.

So the commit says what applying the patch will do, not what you worked on.

good: Add foo interface.

Another commit style is summarizing what a commit does. In this case it would be someting like:

Adds foo interface.

I think this style is more in line with auditing code.

This indicative mood is something I would send back for correction or correct myself where I am the maintainer. However I understand that although this is pretty consistent through FOSS, it is not a settled matter especially in corpo-land. Most important is that it is consistent within a project. See many differing views here on Stackoverflow, noting the most popular answer though is imperative as Linus requests.

Honestly I've never thought about it this much. I'll have to make an effort to stop writing in past tense.

This has been the recommendation and the way to do it for decades everywhere I've been too.