The commit should summarize what IT does, not what YOU did. In ten years, nobody will care who you are or what you did, but they will care what the code does and why.
As a linguistic note, commit messages (at least, English commit messages) almost always use an infinitive verb and therefore may be considered to have no tense at all, though to argue that infinitives have no tense you do need to draw a distinction between tense and aspect.
You're confusing a bare infinitive with an imperative. Infinitives are often, but not always, marked with to. Commit messages are not commands and are not capable of licensing imperative forms.
Here are some examples of bare infinitives in English, with the infinitive form italicized:
1. This organization will help you apply for a loan.
2a. Q: What does he do?
2b. A: Check over the paperwork to be sure everything's right.
A commit message is doing exactly the same thing as occurs in example 2b.
my personal observation: because writing down „what“ is hard. Writing down „why“ is even harder.
The commit message is lazy, but breaking these into separate commits because of some "also" rule of thumb is just blindly following a rule for the sake of it.
Agreed, cargo-culting is always bad!
But, without knowing how OBS development team works, sometimes it does make sense to split commits like this, mainly if you have a larger repository where different people are responsible for different areas in the codebase.
For example, build-scripts sometimes gets managed by other people than the ones writing some core algorithms, who are also different from the people writing public APIs to be consumed by users. In those cases, it makes reviews a lot easier when you can split out to review different commits to different people, instead of having everyone navigate the same commit.
But again, not familiar with the internals nor the development cycle that OBS keeps, so maybe this doesn't make sense in this case.
This commit is based off a branch that was adding support for Apple Silicon.
So the entire PR is not going to look clean until that branch is merged first.
> ...you can't revert just one without reverting the others
That's often true in a split out patchset anyway, so I don't think that on its own it stands as a justification for doing things one way or the other.
Ruthless interactive rebase is one way to fix that last point, but if you take the final result and squash that into a single changeset, there's a point to be made about that as well.
Of course, when merged, it often makes sense to squash some commits together, just like you say - long-term, many of the feature development details are not important.
It's not an either-or proposition.
See also:
https://google.github.io/eng-practices/review/developer/cl-d...
https://microsoft.github.io/code-with-engineering-playbook/c...
My favored github PR template has 3 sections:
- What does this PR do?
- Why is that valuable?
- Link to bug tracker.* Description: (What this does, and why)
* Ref: (Ticket/task link)
* To test: (Specific instructions to make sure things are working as expected)
* To deploy: (What specific servers/services to restart, and operations to perform)
DEFINITELY say what you are doing. And then say why.
This blog post is a good description of the most prevalent convention in how to write good and useful messages (e.g. this is what the Linux Kernel does and given the history of git there's some flow down): https://cbea.ms/git-commit/
The key thing that means you should start with what is having a short one-line summary of what you're doing so you can look at a simple log and see which commit you're interested in.