First ever commit found here https://github.com/apple/swift/commit/afc81c1855bf711315b8e5...
EDIT: License/Header in each of files were apparently retroactively added.
Saved for posterity: https://archive.is/n8iIl
(For simplicity, assume I am the only author of the repo, so I can always change the license arbitrarily whenever I want to.)
No, unless you explicitly state it somewhere (and even then, I'm not certain).
If they add a license to the older commits via rewriting history then yes, those older commits will now be licensed. If they don't do so, then copyright will be default i.e. you can't do anything with it.
Now, if they had a large history and didn't retroactively license files, but just pushed the repository out all at once, I have no idea if the license on the latest commit would apply to the older commits. In the end, the question is all about whether or not Apple has the legal ability to sue you for copyright infringement.
However, my original question still stands. If I hack privately on a git repo and never distribute it, and then I only add a license in commit N right before first releasing it publicly, what is the license of commits 1 through N-1, which do not contain a license themselves (or perhaps contain a different license) but were never distributed separately from the license contained in commit N?
Note by the way that you are ALREADY explicitly granting some rights by putting it on GitHub:
We claim no intellectual property rights over the material you provide to the Service. Your profile and materials uploaded remain yours. However, by setting your pages to be viewed publicly, you agree to allow others to view your Content. By setting your repositories to be viewed publicly, you agree to allow others to view and fork your repositories.
Arguing that this constitutes an implicit license to use this code probably wouldn't be too hard. However trying to relicense/redistribute is less likely. In the end this will have to be decided by a judge in court.
Whatever you write, if copyrightable, automatically achieves copyright protection when fixed in tangible form - and you automatically obtain authorship rights. That gives you the right to grant licenses for any of the rights you've obtained (including to produce derivative works). Swift's license (https://swift.org/LICENSE.txt) allows you to modify the license of your additions (your right under federal law anyway), but not the sections you didn't author.
I mean... I can see it cutting both ways. On its face, it's a very fair system - you can use whatever you want but only own whatever you wrote. What becomes problematic is if companies (realistically) with wide distribution nets grab open-source code, modify it slightly, alter the license of the bundle and resell it. I know that's not a new phenomenon.
Another concern I see is if libraries or maybe files or something have proprietary names, then in theory you'd require an express license from the proprietor (in this case basically Apple).
I was concerned I didn't understand the basic question that prompted my response, which was from rcthompson, but he reframed it: commits 1 to n-1 have sort of Schrodinger's Cat licenses. They have copyright protection (regardless of any of this). And that grants you the right to control licensing of those rights (reproduction, public display, derivative works, etc.). But I don't see why you couldn't retroactively apply whatever you want. The Swift license applies itself, if you don't specify otherwise, upon submission of your work to the licensor (I guess per notice requirements). Until then it's unclear. However, federal copyright protections and state common and statutory laws would also apply (and would basically grant you the right to control licensing).
If you're the sole owner and declare the entire repository contents under XYZ, the previous commits would be available under the license, regardless of the actual commit that adds the license file. If you declare a specific revision under XYZ, then only that revision is under the license.
A different example is the case of a repository with many copyright holders changing the license, and not being able to drag all the previous code into the newly licensed version. You wouldn't be able to take all the commits in history under the terms of the new license.
Let's suppose Alice gives Bob a copy of code whose copyright is owned by Charles, and the code was licensed to Alice under and open/free license.
If the license is revocable, Charles should be able to revoke the licenses for existing copies, and offer replacements that are more closed. Those who do not accept that replacement license should, I think, be able to continue using the copies they have but they will not have a license. Their rights will be limited to those rights that copyright law gives to owners of legally made copies. For software, that would mean they could use the code, but could not make and distribute copies or derivative works.
If the license is irrevocable, then Charles should not be able to take away existing licenses, but he may be able to stop issuing new licenses. That brings is to the issue of sub-licensing. If the license is sub-licensable, then when Alice gives Bob a copy, Alice can also give Bob a license via her sub-licensing right.
If the license is not sub-licensable, then Alice cannot give Bob a license. Bob's license has to come from Charles. So what happens if before Alice gives Bob a copy, Charles has decided to stop issuing new licenses?
I think Alice should still be able to distribute to Bob, because she has a license that allows distribution. Without a license from Charles, though, Bob would only be able to use the code for things copyright allows the owner of a particular legal copy to do without a license, which would be use it himself but would not include making and distributing copies and derivative works.
Alice might be able to argue that the terms of her license with Charles require Charles to provide licenses to those whom Alice distributes to, and so perhaps Alice could go to court to force Charles to keep granting licenses.
I don't recall enough from law school about third party beneficiaries to figure out whether Bob could sue Charles based on Alice's license to get a license from Bob for a copy he got from Alice, or whether, if Charles sued Bob for copyright infringement Bob could use Charles' contractual obligation to Alice in his defense.
You can remove GPL from something you yourself put GPL on, but existing copies held by others are still under GPL.
You can make something Apache licensed that was proprietary too, and old copies will remain proprietary unless you declare an exception valid for all existing copies under your copyright (which may be what you meant?).
If nobody ever has made a copy of a version without the notice, that effectively means that all published versions now are under that license and that nobody may use it under another license, because they have no legal source of it under any other license.
If there's already copies been made, those copies remain under the previous licenses if any (which may be "all rights reserved" as the legal default).
Edit: Also jckarter the creator of the Clay programming language is in there too!
Interesting that they started with git, instead of even a very small section of working code first
Edit yeah. that's basically how they are handling it but with the exception that they are using a public jira instance for language bugs, radar for xcode and nda bound bugs and a mailing list for general discussion.