Post #1953558
2026-03-29 03:04 UTC
@cas @sbysb Those two flows are not incompatible. You can have sensible commit messages describing individual logical changes, and a PR describing a group of related changes. It's exactly the same as the cover letter model.
If your commit messages are essentially worthless and you rely on the PR description to actually describe what is going on, then the solution is to hit the "squash" button instead of the "merge" button and promote the PR description to a single commit message.
I think that once you're collaborating with others, a messy commit history has negative value. The tiny commits are useful ephemerally during development, but not as a historical record. It's better to have larger commits with good documentation than it is to have meandering small commits which hardly make sense on their own. Just squash. That's also very important because PR descriptions are often lost. You don't want important information about code history to exist only in the forge database.
Squashing also makes rebasing and pulling patches out easier, especially if the development process involved trying and redoing things to any extent. Having commits that revert portions of each other in the history is actively harmful in this case. Essentially, if your PR model involves reviewing the "global changes" view, you want to squash. If you review individual commits, you don't.
Replies (1)
-
@lina@vt.social 2026-03-29 03:15
@cas @sbysb And both models can coexist in a single project. Usually what you see is more experienced contributors doing the careful commits thing as part of a complex change, and less experienced contributors sending in simple changes with revisions tacked on as extra commits. As a maintainer it's very easy to see what you're dealing with and choose the right approach to review the PR and whether to hit the merge/rebase or squash button. You don't need to force people into either model (if you don't insist on archaic submission processes like uboot and the kernel do). Forges make it easy to handle both.