Hacker News new | ask | show | jobs
by obelos 1771 days ago
Mixing multiple purposes into a single commit not only makes the initial review more difficult, it makes later review very taxing when, for example, trying to sort out the “why” of a particular change when troubleshooting. If you have to look through 200 lines of non-functional cosmetic changes to suss out the three lines of functional change, you've had to reinvest basically the whole code review process time again just to get oriented.
1 comments

I think those get mixed when fixing the bug is a side effect of a bigger rework, but still needs some specific tweaking for edge cases.

Cleanly split the rework and the edge cases handling can become hard enough to not warrant separate commits.