You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

83 lines
2.1 KiB

  1. Submitting patches to the OpenOCD Gerrit server:
  2. OpenOCD is to some extent a "self service" open source project, so to
  3. contribute, you must follow the standard procedures to have the best
  4. possible chance to get your changes accepted.
  5. The procedure to create a patch is essentially:
  6. - make the changes
  7. - create a commit
  8. - send the changes to the Gerrit server for review
  9. - correct the patch and re-send it according to review feedback
  10. 0. Create a Gerrit account at:
  11. http://openocd.zylin.com
  12. 1. Clone the git repository, rather than just
  13. download the source.
  14. git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
  15. or if you have problems with the "git:" protocol, use
  16. the slower http protocol:
  17. git clone http://repo.or.cz/r/openocd.git
  18. 2. Set up Gerrit with your local repository. All this does it
  19. to instruct git locally how to send off the changes.
  20. Add a new remote to git using Gerrit username:
  21. git remote add review ssh://USERNAME@openocd.zylin.com:29418/openocd.git
  22. git config remote.review.push HEAD:refs/for/master
  23. You will need to install this hook, we will look into a better
  24. solution:
  25. scp -p -P 29418 USERNAME@openocd.zylin.com:hooks/commit-msg .git/hooks/
  26. 3. Set up git with your name and email:
  27. git config --global user.name "John Smith"
  28. git config --global user.email "john@smith.org"
  29. 4. Work on your patches. Split the work into
  30. multiple small patches that can be reviewed and
  31. applied seperately and safely to the OpenOCD
  32. repository.
  33. while(!done) {
  34. work - edit files using your favorite editor.
  35. run "git commit -s -a" to commit all changes.
  36. }
  37. TIP! use "git add ." before commit to add new files.
  38. --- example comment, notice the short first line w/topic ---
  39. topic: short comment
  40. <blank line>
  41. longer comments over several
  42. lines...
  43. -----
  44. 5. Next you need to make sure that your patches
  45. are on top of the latest stuff on the server and
  46. that there are no conflicts.
  47. git pull --rebase origin/master
  48. 6. Send the patches to the Gerrit server for review.
  49. git push review
  50. 7. Forgot something, want to add more? Just make the changes and do:
  51. git commit --amend
  52. git push review
  53. Further reading:
  54. http://www.coreboot.org/Git