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

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)