> Not parts, but the entire thing.
Which would include the HTTP library and the system call implementations it makes into the operating system etc., and you're back to an intractable mess.
> If youtube-dl gets classified as illegal, then any trivial modification to it will get the same treatment. Even if you end up slowly replacing every bit of code, if you forked off youtube-dl and didn't change the functionality, that's still essentially youtube-dl.
Play it backwards and see if it still works. Somebody forks Chrome and creates Chrome, Pirate Edition. The only difference is the logo and that the third party distributors overtly promote it for copyright infringement. It gets declared "illegal" but it's still 99% Chrome, and Chrome is still 99% it. Is Chrome now illegal? Is the shared 99% of it? If not, how are you drawing the distinction?
> Consider cases like going after someone who took GPL code and republished it as proprietary, or plagiarism, or copyright infringement itself. For the law, it doesn't matter whether or not the bits you have are identical to those of the protected work; what matters is how did you get them. It's the same principle at work here.
Except that copyright actually has some well defined mechanisms for determining which aspect of a work is infringement if you copy it. If you publish a book of poems and one of them is in the public domain, you can still copy that one. And the author of each of the other poems still owns the copyright to that poem, even if they're all published together in the same book.
So how does that apply in this case to an open source project with multiple contributors and components?
> In this case, unit tests are evidence that the whole project is meant for copyright infringement. The offending entries serve to establish intent.
Except that the project has multiple independent contributors each with their own intentions, so "the project" doesn't have any singular intent.