SERVER: fix clang warning
[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 - On subsequent sign ins, use the full URL prefaced with 'http://'
20 For example:
21
22 http://user_identifier.open_id_provider.com
23
24 0.1. Add a username to your profile.
25
26 After creating the Gerrit account and signing in, you will need to
27 add a username to your profile. To do this, go to 'Settings', and
28 add a username of your choice.
29
30 Your username will be required in step 2 and substituted wherever
31 the string 'USERNAME' is found.
32
33 0.2. Add an SSH public key
34
35 Following the directions for your specific platform:
36
37 for Windows: help.github.com/win-set-up-git/#_set_up_ssh_keys
38 for OSX: help.github.com/mac-set-up-git/#_set_up_ssh_keys
39 for Linux: help.github.com/linux-set-up-git/#_set_up_ssh_keys
40
41 While these pages describe the setting up of git as well,
42 you should scroll down the page till you get to the section:
43 'Next: Set Up SSH Keys', and follow the steps described.
44
45 1. Clone the git repository, rather than just
46 download the source.
47
48 git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
49
50 or if you have problems with the "git:" protocol, use
51 the slower http protocol:
52
53 git clone http://repo.or.cz/r/openocd.git
54
55 2. Set up Gerrit with your local repository. All this does it
56 to instruct git locally how to send off the changes.
57
58 Add a new remote to git using Gerrit username:
59
60 git remote add review ssh://USERNAME@openocd.zylin.com:29418/openocd.git
61 git config remote.review.push HEAD:refs/for/master
62
63 You will need to install this hook, we will look into a better
64 solution:
65
66 scp -p -P 29418 USERNAME@openocd.zylin.com:hooks/commit-msg .git/hooks/
67
68 3. Set up git with your name and email:
69
70 git config --global user.name "John Smith"
71 git config --global user.email "john@smith.org"
72
73 4. Work on your patches. Split the work into
74 multiple small patches that can be reviewed and
75 applied seperately and safely to the OpenOCD
76 repository.
77
78 while(!done) {
79 work - edit files using your favorite editor.
80 run "git commit -s -a" to commit all changes.
81 }
82
83 TIP! use "git add ." before commit to add new files.
84
85 --- example comment, notice the short first line w/topic ---
86 topic: short comment
87 <blank line>
88 longer comments over several
89 lines...
90 -----
91
92 5. Next you need to make sure that your patches
93 are on top of the latest stuff on the server and
94 that there are no conflicts.
95
96 git pull --rebase origin/master
97
98 6. Send the patches to the Gerrit server for review.
99
100 git push review
101
102 7. Forgot something, want to add more? Just make the changes and do:
103
104 git commit --amend
105 git push review
106
107 Further reading:
108
109 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)