Hacker News new | ask | show | jobs
by GSGBen 1358 days ago
Question for everyone: do you refactor in a separate pull/merge request, or just a separate commit within the same pull/merge request?
2 comments

I don’t know about everyone else, but for me it depends on the scale of refactoring.

If I myself think that receiving such a mixed PR would be troublesome to properly review, then the refactoring gets to be a PR of its own.

If the changes are small enough to all keep in your head at the same time… Then it’s one PR.

I think separate is ideal. But sometimes I only realize the refactor halfway through my changes, at that point I might try to do a chunk on a clean workspace so they can be moved to a separate PR or I’ll just proceed and give generous explanation of all changes in PR with inline comments (comments in PR not in code) and offer to walk reviewers through it.