Added commit sign off section
This was in the main contributing guidelines, but is only enforced in this repo. I've added it here. As part of https://github.com/ipfs/community/issues/63 License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Richard Littauer committed
Nov 2, 2015 at 05:11 UTC
be334f3c3455accef812d8f992ac6c56a388347f
1 file changed
+74
contribute.md
+74
@@ -16,3 +16,77 @@ Please look and conform to our [Go Contribution Guidelines](https://github.com/i
16
- Ask questions or talk about things in [Issues](https://github.com/ipfs/go-ipfs/issues) or #ipfs on freenode.
17
- Ensure you are able to contribute (no legal issues please-- we'll probably setup a CLA).
18
- Have fun!
19
+
20
+## Repository specific guidelines:
21
+
22
+### Commit messages
23
+
24
+Commit messages must start with a short subject line, followed by an optional,
25
+more detailed explanatory text which is separated from the summary by an empty line.
26
+We use [GitCop](https://gitcop.com) to check that commit messages are
27
+properly written. It checks the following:
28
+
29
+* The first line of a commit message, called the subject line should
30
+ not be more than 80 characters long.
31
+
32
+* The commit message should end with the following trailers:
33
+
34
+ ```
35
+ License: MIT
36
+ Signed-off-by: User Name <email@address>
37
+ ```
38
+
39
+ where "User Name" is the author's real (legal) name and
40
+ email@address is one of the author's valid email addresses.
41
+
42
+ These trailers mean that the author agrees with the
43
+ [developer certificate of origin](docs/developer-certificate-of-origin)
44
+ and with licensing the work under the [MIT license](docs/LICENSE).
45
+
46
+ To help you automatically add these trailers, you can run the
47
+ [setup_commit_msg_hook.sh](dev/tools/hooks/setup_commit_msg_hook.sh)
48
+ script which will setup a Git commit-msg hook that will add the above
49
+ trailers to all the commit messages you write.
50
+
51
+See the [documentation about amending commits](docs/amending-commits.md)
52
+for explanation about how you can rework commit messages.
53
+
54
+Some example commit messages:
55
+
56
+```
57
+parse_test: improve tests with stdin enabled arg
58
+
59
+Now also check that we get the right arguments from
60
+the parsing.
61
+
62
+License: MIT
63
+Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
64
+```
65
+
66
+and
67
+
68
+```
69
+net/p2p + secio: parallelize crypto handshake
70
+
71
+We had a very nasty problem: handshakes were serial so incoming
72
+dials would wait for each other to finish handshaking. this was
73
+particularly problematic when handshakes hung-- nodes would not
74
+recover quickly. This led to gateways not bootstrapping peers
75
+fast enough.
76
+
77
+The approach taken here is to do what crypto/tls does:
78
+defer the handshake until Read/Write[1]. There are a number of
79
+reasons why this is _the right thing to do_:
80
+- it delays handshaking until it is known to be necessary (doing io)
81
+- it "accepts" before the handshake, getting the handshake out of the
82
+ critical path entirely.
83
+- it defers to the user's parallelization of conn handling. users
84
+ must implement this in some way already so use that, instead of
85
+ picking constants surely to be wrong (how many handshakes to run
86
+ in parallel?)
87
+
88
+[0] http://golang.org/src/crypto/tls/conn.go#L886
89
+
90
+License: MIT
91
+Signed-off-by: Juan Benet <juan@ipfs.io>
92
+```