3 ms·
110% Absolutely. The main problem is when the programmer who created the squashed commit is no longer around. That subtle bug they introduced in that squashed
by bsder 4y ago
110% Absolutely.
The main problem is when the programmer who created the squashed commit is no longer around.
That subtle bug they introduced in that squashed commit now has to be picked apart without any context. If I have 10,000 tiny commits (and it's never quite that bad because programmers are lazy gits), I can reconstruct come of the context of how that bug got into the codebase and what was going through their head when it occurred.
The other problem with squashed commits is that nobody will ever agree on what the correct granularity of a squash should be. Even if you give me the ability to squash, I won't. Someone else will squash 1,000 lines of changes, and I'll want to scream.
And, to be fair, even Linux doesn't really like squashed commits at the individual level. Try feeding one of those big squashed patches into most maintainers. They'll tell you to GTFO until you bust that apart.
- ColonelPhantom 4y agoHowever, Linux wants you to submit piecemeal patches. Not patches that are a mess and then fixed with a later "woops" commit. Instead, every single part of your patch should be in a small standalone commit, as far as I understand it.