> If the code started with was *GPL'ed, each edit resulted in a GPL'ed piece of code, thus the final edit was a change to a GPL'd piece of code and the result is GPLed.
The second clause is not correct. Each edit does not result in GPL'd code. GPL only applies to the code you start with. If you want to redistribute the code with the modifications, then the GPL requires that you make your changes available under the GPL. If you cannot license the work in this way, then you may not redistribute it; the licensing under the GPL is not automatic, and it may not even be possible (e.g., if the modifications are copied from code with an incompatible licence). But this does not apply if none of the code you want to distribute is covered under the GPL. So if you remove all of the original code, and your final work is independent of the original, then the GPL would not apply.
The license still applies even when the redistribution clause is not being exercised (else any edit on your machine would strip the license!). This is an unremarkable part of the language and of contract law.
If you mix in other code that you don’t have the right to distribute into the GPL code this has the same kind of impact as doing that with non-GPL code.
Yes, of course the licence applies even without redistribution. Without a copyright licence, the user does not have the right to use, modify or distribute the code.
But what the licence applies to is the original work. If you replace half of the original work with your own work, then the GPL applies to the remaining half of the original work, while you would own the copyright to your own half of it. GPL requires you to license modifications under the GPL only if you redistribute them. But if what you are distributing is modified to the point of being completely independent of the original, with none of the original code or any dependency on it remaining, then the GPL is no longer relevant to it.
According to that logic, you may just rewrite any GPL code line by line and then apply any license you want to distribute the result. It doesn't sound right.
Copyright also applies to the structure of the code. So rewriting it line by line would not be enough to remove all of the GPL-licensed elements. You would also need to restructure and reorganise it.
The second clause is not correct. Each edit does not result in GPL'd code. GPL only applies to the code you start with. If you want to redistribute the code with the modifications, then the GPL requires that you make your changes available under the GPL. If you cannot license the work in this way, then you may not redistribute it; the licensing under the GPL is not automatic, and it may not even be possible (e.g., if the modifications are copied from code with an incompatible licence). But this does not apply if none of the code you want to distribute is covered under the GPL. So if you remove all of the original code, and your final work is independent of the original, then the GPL would not apply.