I once was tasked to refactor a 10k+ line disorganized and effectively illegible series of Stored Procedures, much of which having originally been authored when I was nine years old (was 23 at the time). Some devs were pissed that it was practically impossible to ascertain exactly what I had done, with the left half of the diff fully red and the right half fully green. So at my day job, I try not to do that nowadays unless I really, really need to (for my own mental health and posterity's sake alike). Still doesn't go over well, especially since some of the code was written by active senior developers on the team who actually remember piecing it together over the past 16+ years.
Smaller things I'll fix up on the spot, though.