SUBMITTING_PATCHES 2.8 KB

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