David Benjamin | 5acc423 | 2016-02-10 16:32:25 -0500 | [diff] [blame] | 1 | Want to contribute? Great! First, read this page (including the small print at the end). |
| 2 | |
| 3 | ### Before you contribute |
| 4 | Before we can use your code, you must sign the |
| 5 | [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) |
| 6 | (CLA), which you can do online. The CLA is necessary mainly because you own the |
| 7 | copyright to your changes, even after your contribution becomes part of our |
| 8 | codebase, so we need your permission to use and distribute your code. We also |
| 9 | need to be sure of various other things—for instance that you'll tell us if you |
| 10 | know that your code infringes on other people's patents. You don't have to sign |
| 11 | the CLA until after you've submitted your code for review and a member has |
| 12 | approved it, but you must do it before we can put your code into our codebase. |
| 13 | Before you start working on a larger contribution, you should get in touch with |
| 14 | us first via email with your idea so that we can help out and possibly guide |
| 15 | you. Coordinating up front makes it much easier to avoid frustration later on. |
| 16 | |
| 17 | ### Code reviews |
| 18 | All submissions, including submissions by project members, require review. We |
| 19 | use [Gerrit](https://boringssl-review.googlesource.com) for this purpose. |
| 20 | |
| 21 | #### Setup |
| 22 | If you have not done so on this machine, you will need to set up a password for |
| 23 | Gerrit. Sign in with a Google account, visit |
| 24 | [this link](https://boringssl.googlesource.com/), and click the "Generate |
muir.james.a@gmail.com | 36a41bf | 2022-01-16 13:26:49 -0500 | [diff] [blame] | 25 | Password" link in the top right. You must also have a Gerrit account associated with |
| 26 | your Google account. To do this visit the [Gerrit review server](https://boringssl-review.googlesource.com) |
| 27 | and click "Sign in" (top right). |
| 28 | You will also need to prepare your checkout to |
David Benjamin | 5acc423 | 2016-02-10 16:32:25 -0500 | [diff] [blame] | 29 | [add Change-Ids](https://gerrit-review.googlesource.com/Documentation/cmd-hook-commit-msg.html) |
| 30 | on commit. Run: |
| 31 | |
| 32 | curl -Lo .git/hooks/commit-msg https://boringssl-review.googlesource.com/tools/hooks/commit-msg |
| 33 | chmod u+x .git/hooks/commit-msg |
| 34 | |
| 35 | #### Uploading changes |
| 36 | To upload a change, push it to the special `refs/for/master` target: |
| 37 | |
| 38 | git push origin HEAD:refs/for/master |
| 39 | |
Bob Beck | badf673 | 2023-02-17 09:42:06 -0700 | [diff] [blame] | 40 | The output will then give you a link to the change. Add `agl@google.com`, |
| 41 | `davidben@google.com`, and `bbe@google.com` as reviewers. |
David Benjamin | 5acc423 | 2016-02-10 16:32:25 -0500 | [diff] [blame] | 42 | |
| 43 | Pushing a commit with the same Change-Id as an existing change will upload a new |
| 44 | version of it. (Use the `git rebase` or `git commit --amend` commands.) |
| 45 | |
| 46 | For more detailed instructions, see the |
| 47 | [Gerrit User Guide](https://gerrit-review.googlesource.com/Documentation/intro-user.html). |
| 48 | |
| 49 | ### The small print |
| 50 | Contributions made by corporations are covered by a different agreement than |
| 51 | the one above, the |
| 52 | [Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate). |