I have a method of coding/refactoring that I now automatically do, but I realise I don't know what it's called.
If I am making a change, and realise there needs to be a change to some existing code, I always consider if I can do that change first, without any change of behaviour. If I can, I do so, making sure tests pass, commit, and deploy if possible. Only then I actually make the change for the task at hand.
Sometimes, this earlier change might reveal to actually need another change, which can also be done first, and so on. (Although this being nested several levels deep has been quite rare, probably because the initial size of the task I set out to do I try to keep small anyway)
What is this method called?