copyright licensing open-source-software
What is the license of the code submitted for review but not yet incorporated in the project?
<p>In the case when there is no explicit mention regarding the rules for such case in the project policy (like, f.e. <a href="https://stackoverflow.com/questions/55705895/why-do-i-need-to-submit-a-patch-under-a-license">GitHub</a>
 has), what is the status of the code/patch submitted for the review (using mailing list or some other platform)?
Is it automatically licensed under the same license as the target project (I can see it being the case for "viral" licenses but what about others?)?
Does anyone have the same rights (copy, distribute) regarding it as they do with mainline project (even if it'll end up not being accepted)?</p>

<p>I'm not aware of any legal cases about this in particular, so I'll try to answer from the basic principles of copyright law.</p>

<p>The copyright in the contribution automatically belongs to the person who wrote it, and stays with them unless they make a written transfer. </p>

<p>Whether a patch is a derivative work is an interesting question. At one extreme, a patch that adds new functionality to a project so that the bulk of the contribution is completely new is clearly a new work; the fact that it is designed to work in the context of pre-existing code does not change this. At the other extreme if I contribute a patch which makes a large number of small changes in different places then my contribution cannot be meaningfully separated from the existing code and the result should therefore be considered derivative of the original. In between is a big grey area.</p>

<p>If the patch is a derivative work then it can only be distributed with permission of the original copyright holder, which in the case of an open source project means the relevant license. However this doesn't mean that the work is <em>automatically</em> licensed: the patch creator still has to license  for distribution as well, and in theory the patch creator could withhold that license.</p>

<p>If the patch is not a derivative work then of course the creator can distribute it under any license at all.</p>

<p>When the patch is combined with the original code the result is a derived work of both the original code and the patch. Hence this derived work can only be distributed under a license which covers both. In practice this means the same license; an open source project maintainer would be very ill-advised to accept patches under any other license.</p>

<p>A license can only be created by the copyright owner. In the case of an open source contribution the license cannot be created by any decision of the existing project, so the acceptance or otherwise does not create a license (unless this is a specific term of an agreement, but the question stipulates otherwise).</p>

<p>In the UK it is possible to create an implied license by a mixture of positive and neutral acts. (In this context a "neutral act" seems to be the absence of a negative act). See <a href="https://ora.ox.ac.uk/objects/uuid:8d5f4169-4f04-4e1f-9600-d93b6adbcd53/download_file?file_format=pdf&amp;safe_filename=Implied%2BLicences%2Bin%2BCopyright%2BLaw_Final.pdf&amp;type_of_work=Thesis" rel="nofollow noreferrer">page 48 of this thesis</a> (PDF), which looks at implied licenses in UK law. In this case the contribution of a patch to an open source project is a positive act indicating an intention to license the patch under the same terms as the project, and the neutral act is the failure to raise an objection when the patch is incorporated in the project. Together these create an implied licence for the patch under which the composite work can be distributed.</p>

<p>Whether this license exists if the patch is not accepted is more arguable. As I said above, the decision to accept or reject the patch doesn't create the license, but the "neutral act" of not objecting to its incorporation doesn't happen, so by the logic above the license has not come into being. OTOH if someone else picks it up and distributes it separately under the same license as the original project (e.g. in a fork) then as long as the patch author was notified they would have the same opportunity to object and hence the license would be created.</p>

<p>US law is similar, although seems to be less specific about positive and neutral acts. The <a href="https://www.bitlaw.com/copyright/license.html" rel="nofollow noreferrer">following extract from a BitLaw article</a> sums it up:</p>

<blockquote>
  <p>The purpose of an implied license is to allow the licensee (the party who licenses the work from the copyright owner) some right to use the copyrighted work, but only to the extent that the copyright owner would have allowed had the parties negotiated an agreement. Generally, the custom and practice of the community are used to determine the scope of the implied license.</p>
</blockquote>

<p>In this case the "community" would be open source in general and the project in particular, so the license would depend on the facts of custom and practice within the community. As the submission of a patch is customarily done with the intention of contributing to the larger work this would imply that the patch is licensed accordingly.</p>
