Annotation of htdocs/developers/commit-guidelines.html, revision 1.29
1.1 jschauma 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2: <html xmlns:html="http://www.w3.org/1999/xhtml">
3: <head>
4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1.27 heinz 5: <meta name="generator" content="Website XSL Stylesheet V2.6.0">
1.21 jschauma 6: <link rel="home" href="../." title="Welcome to The NetBSD Project: Of course it runs NetBSD.">
7: <link rel="up" href="../developers/." title="NetBSD Developer Documentation">
1.27 heinz 8: <link rel="previous" href="../developers/announce.html" title="NetBSD Developer Documentation: News story guidelines">
1.26 darcy 9: <link rel="next" href="../developers/cvs-repos/notes.html" title="Misc developer CVS notes">
1.27 heinz 10: <link rel="first" href="../developers/announce.html" title="NetBSD Developer Documentation: News story guidelines">
11: <link rel="last" href="../developers/www.html" title="NetBSD Developer Documentation: Information about the www
12: mailing list">
1.1 jschauma 13: <link rel="stylesheet" href="/NetBSD.css" type="text/css">
14: <title>NetBSD Commit Guidelines</title>
15: </head>
1.27 heinz 16: <body class="website"><div class="webpage">
17: <a name="developers-commit-guidelines"></a><h1>NetBSD Commit Guidelines</h1>
1.1 jschauma 18: <div class="sect1" lang="en">
1.12 wiz 19: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1.1 jschauma 20: <a name="guidelines"></a>
21: The following Commit Guidelines define the Project's standards for making
22: commits to the source tree:
1.12 wiz 23: </h2></div></div></div>
1.1 jschauma 24:
25:
26:
27: <div class="orderedlist"><ol type="1">
28: <li>
29: <div class="sect2" lang="en">
1.12 wiz 30: <div class="titlepage"><div><div><h3 class="title">
31: <a name="know-thy-code"></a>Commit only code you are familiar with.</h3></div></div></div>
1.1 jschauma 32:
33: <p>
34: If you are not sure if the code you plan to commit is acceptable
35: (e. g. when taking code that was submitted with a problem report),
36: ask a developer who is familiar with that part of the system for
37: review. If you're new to the Project, check with your sponsor.
38: </p>
39: </div>
40: </li>
41: <li>
42: <div class="sect2" lang="en">
1.12 wiz 43: <div class="titlepage"><div><div><h3 class="title">
44: <a name="tainted"></a>Do not commit tainted code to the repository.</h3></div></div></div>
1.1 jschauma 45:
46: <p>
47: If you commit code that was not written by yourself, double check
48: that the license on that code permits import into the NetBSD source
49: repository, and permits free distribution. Check with the author(s)
50: of the code, make sure that they were the sole author of the code
51: and verify with them that they did not copy any other code.
52: </p>
53: </div>
54: </li>
55: <li>
56: <div class="sect2" lang="en">
1.12 wiz 57: <div class="titlepage"><div><div><h3 class="title">
1.29 ! jschauma 58: <a name="repository"></a>Do not commit code from foreign trees.</h3></div></div></div>
! 59:
! 60: <p>
! 61: Do not commit code from a tree checked out from anywhere but from
! 62: cvs.NetBSD.org. Note that all developers have access to the private
! 63: <a href="restricted.html#rsync" target="_top">rsync-over-ssh service on
! 64: cvs.NetBSD.org</a>.
! 65: </p>
! 66: </div>
! 67: </li>
! 68: <li>
! 69: <div class="sect2" lang="en">
! 70: <div class="titlepage"><div><div><h3 class="title">
1.1 jschauma 71: <a name="intrusive"></a>
72: The more intrusive your changes are the higher is the level of
73: required prior approval.
1.12 wiz 74: </h3></div></div></div>
1.1 jschauma 75:
76: <div class="itemizedlist"><ul type="disc">
77: <li>
78: <p>
79: "Obvious" fixes can be committed without any prior discussion
80: or review. (The definition of "obvious" in the GCC Project is:
81: "could not possibly cause anyone to object." We adopt this
82: definition here)
83: </p>
84: </li>
85: <li>
86: <p>
87: All other (i. e. "non-obvious") fixes <span class="emphasis"><em>should</em></span>
88: have a review.
89: </p>
90: </li>
91: <li>
92: <p>
93: Implementing (significant) new features requires a prior
94: discussion on an appropriate technical mailing list.
95: </p>
96: </li>
97: <li>
98: <p>
99: Changing existing interfaces in libraries or in the kernel
100: requires prior approval by Core.
101: </p>
102: </li>
103: </ul></div>
104: </div>
105: </li>
106: <li>
107: <div class="sect2" lang="en">
1.12 wiz 108: <div class="titlepage"><div><div><h3 class="title">
109: <a name="tested"></a>Commit only code that you have tested.</h3></div></div></div>
1.1 jschauma 110:
111: <p>
112: Make sure that your code actually works as expected, by
113: compiling and running the code that is affected by your change
114: with your system's tools. If you changed a man page, make sure
115: that groff/nroff creates the formatted man page you expect.
116: </p>
117: <p>
118: For normal commits (to the trunk), test that your code works
119: on -current. Prior to reqesting a pull-up to a branch, test
120: the very changes you will request from releng on the respective
121: release branch.
122: </p>
123: </div>
124: </li>
125: <li>
126: <div class="sect2" lang="en">
1.12 wiz 127: <div class="titlepage"><div><div><h3 class="title">
128: <a name="group"></a>Group commits together that are part of the same fix.</h3></div></div></div>
1.1 jschauma 129:
130: <p>
131: Rototilling a make variable that affects 50 Makefiles should get
132: one commit for all of them together.
133: </p>
134: </div>
135: </li>
136: <li>
137: <div class="sect2" lang="en">
1.12 wiz 138: <div class="titlepage"><div><div><h3 class="title">
139: <a name="separate"></a>Each commit should be a separate patch/fix/addition/etc.</h3></div></div></div>
1.1 jschauma 140:
141: <p>
142: Don't fix 3 bugs with the same commit and roll that into
143: "Fixed some bugs". Fix one, test, commit, rinse, repeat. This
144: makes life infinitely easier for releng to pull up fixes since
145: often not everything applies to a given branch.
146: </p>
147: </div>
148: </li>
149: <li>
150: <div class="sect2" lang="en">
1.12 wiz 151: <div class="titlepage"><div><div><h3 class="title">
1.1 jschauma 152: <a name="dont-mix"></a>
153: Do not mix functionality or bug-fix patches with
154: whitespace/layout updates.
1.12 wiz 155: </h3></div></div></div>
1.1 jschauma 156:
157: <p>
158: Do those separately (apart from the general requirement that
159: changes be made in such a way that it is easy to discern what
160: each fix did, as described in item 6, there will be pullup
161: issues with largely changed files from trunk->branch when
162: mixing whitespace with functionality fixes).
163: </p>
164: </div>
165: </li>
166: <li>
167: <div class="sect2" lang="en">
1.12 wiz 168: <div class="titlepage"><div><div><h3 class="title">
169: <a name="document"></a>Clearly document your changes in the commit log.</h3></div></div></div>
1.1 jschauma 170:
171: <p>
172: Detail to some degree what was changed and why. Doesn't need
173: to be a code review/walkthrough but it should be informative
174: to someone reading the log and looking over the diff in 6
175: months. Again "fixed some stuff" or "cvs-1.10.0" isn't
176: acceptable whereas the following example is:
177: </p>
178: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
179: <h3 class="title"></h3>
180: "Print useful line number on error while executing .for directive."
181: </div>
182: <p>
183: If your change fixes a PR, document this:
184: </p>
185: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
186: <h3 class="title"></h3>
187: "Closes PR bin/6666"
188: </div>
189: <p>
190: If your code has been reviewed by someone else, document this:
191: </p>
192: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
193: <h3 class="title"></h3>
194: "Reviewed by <mrg>"
195: </div>
196: <p>
197: (Please note that a good commit log doesn't relieve the need
198: for good documentation in the program itself.)
199: </p>
200: </div>
201: </li>
202: <li>
203: <div class="sect2" lang="en">
1.12 wiz 204: <div class="titlepage"><div><div><h3 class="title">
205: <a name="credit"></a>Give proper credit.</h3></div></div></div>
1.1 jschauma 206:
207: <p>
208: If you commit code that had been submitted in a PR, give
209: proper credit, like:
210: </p>
211: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
212: <h3 class="title"></h3>
213: "Code submitted in PR lib/393939 by Joe Doe"
214: </div>
215: <p>
216: Since the commit messages will eventually appear on the
217: source-changes mailing list which is also available via web,
218: specifying the e-mail addresses of the PR submitter should
219: generally be avoided.
220: </p>
221: <p>
222: If you took code from an other Open Source Project, give
223: credit, like:
224: </p>
225: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
226: <h3 class="title"></h3>
227: "From FreeBSD"
228: </div>
229: </div>
230: </li>
231: <li>
232: <div class="sect2" lang="en">
1.12 wiz 233: <div class="titlepage"><div><div><h3 class="title">
234: <a name="revert"></a>Do not revert other developer's commits.</h3></div></div></div>
1.1 jschauma 235:
236: <p>
237: If you do not agree with another developer's commit, do not
238: revert it on your own. Contact the other developer and explain
239: to him or her the issues you have with his commit. Ask him
240: or her to backout his changes himself.
241: </p>
242: <p>
243: If no agreement can be reached, contact the Technical
244: Executive Committee <technical-exec@NetBSD.org>, which
245: will serve as mediation authority.
246: </p>
247: </div>
248: </li>
249: </ol></div>
250:
251: </div>
252: <div class="navfoot">
253: <hr>
254: <table border="0" summary="Footer navigation"><tr>
1.27 heinz 255: <td class="foothome"><span class="foothome"><a href="../."><img src="/images/NetBSD-flag.png" alt="[NetBSD flag]" border="0" width="90" height="90"></a></span></td>
1.1 jschauma 256: <td class="foothome">
1.21 jschauma 257: <span class="foothome"><a href="../.">Home page</a></span><br>
1.1 jschauma 258: </td>
259: </tr></table>
260: <hr>
261: </div>
262: <p></p>
263: <span class="footfeed"><a href="http://www.NetBSD.org/cgi-bin/feedback.cgi">(contact us)</a></span>
264:
265:
1.29 ! jschauma 266: <span class="foottag">Generated from <em>%NetBSD: commit-guidelines.xml,v 1.4 2005/10/11 03:06:30 jschauma Exp %</em></span><br><span class="footcopy"><a href="/Misc/disclaimer.html"><span class="copyright">Copyright © 1994-2005 The NetBSD Foundation, Inc. </span>ALL RIGHTS RESERVED.<br>NetBSD<sup>®</sup> is a registered trademark of The NetBSD
1.28 mishka 267: Foundation, Inc.</a></span>
1.1 jschauma 268: </div></body>
269: </html>
CVSweb <webmaster@jp.NetBSD.org>