5 ms·
There are changes that can only be made in one giant change. I refactored a monster class into three smaller classes, and it was a huge change. I don't have a
by AnimalMuppet 4y ago
There are changes that can only be made in one giant change. I refactored a monster class into three smaller classes, and it was a huge change. I don't have a line count, but it might have been 5000 lines. Mostly, though, it was moving some things out of the original class and into two new classes. So the diffs were monstrous, but the actual change wasn't that big.
So I've done that... once. I don't think I've done anything like it any other time.
Maybe a way to do this is to say that yes, you can do a code review that large, but only with justification, and the justification has to be accepted by the reviewer, not just by the change author (or the author's manager).
- verdverm 4y agoWe use a two-level workflow for large refactors like this. 1. create a long-running branch that will eventually be merged to the main branch 2. create N small branches from (1) that get merged back into (1) and contain pieces of the overall effort. In this way, each smaller change is reviewed and tested along the way and the main branch is unaffected until all work is done.