blob: 50e2cf77bd60e342b859bc40469388e55d892d78 [file] [log] [blame]
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -07001Short Version:
2
3 - Make small logical changes.
4 - Provide a meaningful commit message.
David Pursehouse4f7bdea2012-10-22 12:50:15 +09005 - Check for coding errors with pylint
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -07006 - Make sure all code is under the Apache License, 2.0.
7 - Publish your changes for review:
8
David Pursehousea43f42f2012-08-21 16:26:07 +09009 git push https://gerrit-review.googlesource.com/git-repo HEAD:refs/for/master
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070010
11
12Long Version:
13
14I wanted a file describing how to submit patches for repo,
15so I started with the one found in the core Git distribution
16(Documentation/SubmittingPatches), which itself was based on the
17patch submission guidelines for the Linux kernel.
18
19However there are some differences, so please review and familiarize
20yourself with the following relevant bits:
21
22
23(1) Make separate commits for logically separate changes.
24
25Unless your patch is really trivial, you should not be sending
26out a patch that was generated between your working tree and your
27commit head. Instead, always make a commit with complete commit
28message and generate a series of patches from your repository.
29It is a good discipline.
30
31Describe the technical detail of the change(s).
32
33If your description starts to get too long, that's a sign that you
34probably need to split up your commit to finer grained pieces.
35
36
David Pursehouse4f7bdea2012-10-22 12:50:15 +090037(2) Check for coding errors with pylint
38
39Run pylint on changed modules using the provided configuration:
40
41 pylint --rcfile=.pylintrc file.py
42
43
44(3) Check the license
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070045
46repo is licensed under the Apache License, 2.0.
47
48Because of this licensing model *every* file within the project
49*must* list the license that covers it in the header of the file.
50Any new contributions to an existing file *must* be submitted under
51the current license of that file. Any new files *must* clearly
52indicate which license they are provided under in the file header.
53
54Please verify that you are legally allowed and willing to submit your
55changes under the license covering each file *prior* to submitting
56your patch. It is virtually impossible to remove a patch once it
57has been applied and pushed out.
58
59
David Pursehouse4f7bdea2012-10-22 12:50:15 +090060(4) Sending your patches.
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070061
62Do not email your patches to anyone.
63
64Instead, login to the Gerrit Code Review tool at:
65
Shawn O. Pearce9b017da2012-02-28 18:53:12 -080066 https://gerrit-review.googlesource.com/
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070067
68Ensure you have completed one of the necessary contributor
69agreements, providing documentation to the project maintainers that
70they have right to redistribute your work under the Apache License:
71
Shawn O. Pearce9b017da2012-02-28 18:53:12 -080072 https://gerrit-review.googlesource.com/#/settings/agreements
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070073
Shawn O. Pearce9b017da2012-02-28 18:53:12 -080074Ensure you have obtained an HTTP password to authenticate:
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070075
Shawn O. Pearce9b017da2012-02-28 18:53:12 -080076 https://gerrit-review.googlesource.com/new-password
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070077
Shawn O. Pearce9b017da2012-02-28 18:53:12 -080078Push your patches over HTTPS to the review server, possibly through
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070079a remembered remote to make this easier in the future:
80
Shawn O. Pearce9b017da2012-02-28 18:53:12 -080081 git config remote.review.url https://gerrit-review.googlesource.com/git-repo
David Pursehousea43f42f2012-08-21 16:26:07 +090082 git config remote.review.push HEAD:refs/for/master
Shawn O. Pearce2d1a3962009-07-02 13:18:42 -070083
84 git push review
85
86You will be automatically emailed a copy of your commits, and any
87comments made by the project maintainers.