Search code examples
githubopen-source

Why do I need to submit a patch under a license?


I created a patch for a project in github using pull request, and their author said I need to add a comment of I am submitting this patch under the XXX license.
So why I need to submit patch under a license?
What will happen if I do not add that comment?


Solution

  • From what you've described--and I'm further assuming that the repo already contains a notice of license (e.g. a LICENSE file), it isn't necessary for you to add the comment for your contribution to fall under the license of the repository. Per the GitHub Terms of Service:

    1. Contributions Under Repository License

    Whenever you make a contribution to a repository containing notice of a license, you license your contribution under the same terms, and you agree that you have the right to license your contribution under those terms. If you have a separate agreement to license your contributions under different terms, such as a contributor license agreement, that agreement will supersede.

    Isn't this just how it works already? Yep. This is widely accepted as the norm in the open-source community; it's commonly referred to by the shorthand "inbound=outbound". We're just making it explicit.

    That said, the repository could be owned by a company whose legal counsel has made an internal requirement that in order for the repository to accept outside contributions, an explicit statement by the contributor is required.

    There's also the case (but not in the case as you've described), where a project requires a Contributor License Agreement (CLA) because, for example, the project owner(s) want you to state that you are actually entitled to make the contribution you are offering (e.g. it isn't some proprietary code from your work) or to even assign your copyright (e.g. so that the project can pursue a legal claim against someone violating the license or later re-license the code without having to track down and get approval from every single contributor). Apache, Google, Facebook, Canonical, and Fedora projects (among many, many others) all require CLAs.

    Depending on how strongly you feel about arguing the point, you could point the project maintainer's to GitHub's Terms of Service (linked above) and also to Ben Balter's "Why you probably shouldn’t add a CLA to your open source project".

    TL;DR:

    From both a common-sense and GitHub Terms of Service point of view, you already are submitting the code under the repo's license, whether or not you add the explicit comment.