by RustyRussell · 4y ago · 0 comments
To quote Kernighan and Plauger: "Don't patch bad code: rewrite it".
* It can make the bug fix diff much easier to read/understand
* It makes the refactor a dependency of the bug fix, so it doesn't end up getting dropped as "not important enough"
Of course, if the refactor automatically makes the bug go away, then it's fine to do a single PR, because the refactor is the bug fix.