Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 1 | Short Version: |
| 2 | |
| 3 | - Make small logical changes. |
| 4 | - Provide a meaningful commit message. |
| 5 | - Make sure all code is under the Apache License, 2.0. |
| 6 | - Publish your changes for review: |
| 7 | |
David Pursehouse | a43f42f | 2012-08-21 16:26:07 +0900 | [diff] [blame] | 8 | git push https://gerrit-review.googlesource.com/git-repo HEAD:refs/for/master |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 9 | |
| 10 | |
| 11 | Long Version: |
| 12 | |
| 13 | I wanted a file describing how to submit patches for repo, |
| 14 | so I started with the one found in the core Git distribution |
| 15 | (Documentation/SubmittingPatches), which itself was based on the |
| 16 | patch submission guidelines for the Linux kernel. |
| 17 | |
| 18 | However there are some differences, so please review and familiarize |
| 19 | yourself with the following relevant bits: |
| 20 | |
| 21 | |
| 22 | (1) Make separate commits for logically separate changes. |
| 23 | |
| 24 | Unless your patch is really trivial, you should not be sending |
| 25 | out a patch that was generated between your working tree and your |
| 26 | commit head. Instead, always make a commit with complete commit |
| 27 | message and generate a series of patches from your repository. |
| 28 | It is a good discipline. |
| 29 | |
| 30 | Describe the technical detail of the change(s). |
| 31 | |
| 32 | If your description starts to get too long, that's a sign that you |
| 33 | probably need to split up your commit to finer grained pieces. |
| 34 | |
| 35 | |
| 36 | (2) Check the license |
| 37 | |
| 38 | repo is licensed under the Apache License, 2.0. |
| 39 | |
| 40 | Because of this licensing model *every* file within the project |
| 41 | *must* list the license that covers it in the header of the file. |
| 42 | Any new contributions to an existing file *must* be submitted under |
| 43 | the current license of that file. Any new files *must* clearly |
| 44 | indicate which license they are provided under in the file header. |
| 45 | |
| 46 | Please verify that you are legally allowed and willing to submit your |
| 47 | changes under the license covering each file *prior* to submitting |
| 48 | your patch. It is virtually impossible to remove a patch once it |
| 49 | has been applied and pushed out. |
| 50 | |
| 51 | |
| 52 | (3) Sending your patches. |
| 53 | |
| 54 | Do not email your patches to anyone. |
| 55 | |
| 56 | Instead, login to the Gerrit Code Review tool at: |
| 57 | |
Shawn O. Pearce | 9b017da | 2012-02-28 18:53:12 -0800 | [diff] [blame] | 58 | https://gerrit-review.googlesource.com/ |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 59 | |
| 60 | Ensure you have completed one of the necessary contributor |
| 61 | agreements, providing documentation to the project maintainers that |
| 62 | they have right to redistribute your work under the Apache License: |
| 63 | |
Shawn O. Pearce | 9b017da | 2012-02-28 18:53:12 -0800 | [diff] [blame] | 64 | https://gerrit-review.googlesource.com/#/settings/agreements |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 65 | |
Shawn O. Pearce | 9b017da | 2012-02-28 18:53:12 -0800 | [diff] [blame] | 66 | Ensure you have obtained an HTTP password to authenticate: |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 67 | |
Shawn O. Pearce | 9b017da | 2012-02-28 18:53:12 -0800 | [diff] [blame] | 68 | https://gerrit-review.googlesource.com/new-password |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 69 | |
Shawn O. Pearce | 9b017da | 2012-02-28 18:53:12 -0800 | [diff] [blame] | 70 | Push your patches over HTTPS to the review server, possibly through |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 71 | a remembered remote to make this easier in the future: |
| 72 | |
Shawn O. Pearce | 9b017da | 2012-02-28 18:53:12 -0800 | [diff] [blame] | 73 | git config remote.review.url https://gerrit-review.googlesource.com/git-repo |
David Pursehouse | a43f42f | 2012-08-21 16:26:07 +0900 | [diff] [blame] | 74 | git config remote.review.push HEAD:refs/for/master |
Shawn O. Pearce | 2d1a396 | 2009-07-02 13:18:42 -0700 | [diff] [blame] | 75 | |
| 76 | git push review |
| 77 | |
| 78 | You will be automatically emailed a copy of your commits, and any |
| 79 | comments made by the project maintainers. |