2 ms·
I think that the two ideas are separate. You should fix problems that you see, but you should do this in separate commits (and ideally PRs). There are a few be
by shepherdjerred 4y ago
I think that the two ideas are separate. You should fix problems that you see, but you should do this in separate commits (and ideally PRs).
There are a few benefits
If your refactor is large, you can get a bug fix in ASAP in a small PR, and get the large PR reviewed later. Sometimes I’ve done a refactor with a stubborn CI integration test or two that might take a few days to fix due to long feedback cycles.
Aside from that it lets your reviewer enter a different mindset for each change. The bug fix is more easily understood, and the reviewer expects a change in behavior. For a refactor the reviewer can usually review in a more relaxed manner because they know the behavior can/should be the same, and good unit tests should identify any differences in behavior