1 <?
include ("barry.inc"); ?
>
3 <?
createHeader("Submitting Patches"); ?
>
5 <?
createSubHeader("Coding Guidelines"); ?
>
7 <p
>If you are submitting code
, please have a look at the
8 <?
createLink("codingguide", "Coding Guidelines page"); ?
>.</p
>
10 <p
>Please keep some things in mind when preparing your patches
13 <li
>use one patch per logical change
</li
>
14 <li
>test all coding changes
</li
>
16 <li
>If it is a change to the build system
, make sure that
17 the test
/buildtest
.sh script still works
.</li
>
19 <li
>include some commentary above your patch in your email
</li
>
20 <li
>when mailing patches
, try to keep one patch per email
</li
>
21 <li
>do not cut
and paste patches
... either read them in
22 directly to your mail
body (preferred
),
23 or send
as an attachment
</li
>
24 <li
>add a
[PATCH
] prefix to your subject line
</li
>
29 <?
createSubHeader("Why Submit Patches?"); ?
>
31 <p
>Submitting your changes via patch is a good thing
. It may seem like
32 an extra bit of work to create a patch
and post it to the mailing
list,
33 or to make your work available in a
public git repo
, but there are good
34 reasons why Open Source works that way
:</p
>
37 <li
>Patches tell the maintainer that you
<b
>want
</b
> your change
38 to be added to the tree
. It is often too easy
for busy
39 programmers to misunderstand someone
's intentions if
40 they just send a random file. If intentions are not
41 clear, work gets dropped on the floor.</li>
42 <li>Patches show that you have worked with the source code,
43 and hopefully have tested your change.</li>
44 <li>Patches show that you have given some thought to where
45 your changes should go in the tree.</li>
46 <li>Patches to a public mailing list encourage peer review, and show
47 that you are ok with your code being included in a public
49 <li>Patches to a public mailing list or a public repository become
50 part of history, showing who did what, and when.</li>
51 <li>Patches usually get top priority from developers.</li>
52 <li>Patches make life easier for the developers, freeing up their
53 time for more features and bug fixes.</li>
54 <li>Patches turn you into a developer. Your name can be added
55 to the AUTHORS file.</li>
59 <? createSubHeader("Generating Patches"); ?>
61 <p>Generating patches depends on the method you used to get the source code.
63 <li>If you are using a tarball, expand the tarball once into
64 a pristine directory, and again into your "working
65 directory." When you are finished and
69 ./buildgen.sh cleanall
71 diff -ruN barry-orig barry-work > patchfile
75 <li>If you are using the git tree, you can make your changes
76 in your own branch, and then create patches for each
80 git format
-patch origin
/master
88 <?
createSubHeader("Methods for Submitting Patches"); ?
>
90 <p
>Submitting changes can happen in one of three methods
:
93 <li
>Send a patch to the
94 <a href
="http://sourceforge.net/mail/?group_id=153722">mailing
list</a
>.
97 <li
>Publish your own git
repository (perhaps by creating a
99 <a href
="http://repo.or.cz/">repo
.or.cz
</a
>)
100 and notify the mailing
list, indicating the
101 branch you want people to pull from when
104 <li>Use the "mob" branch on <a href="http://repo.or.cz/w/barry.git">
105 Barry's git repository
</a
>, and....
106 send a notification to the mailing
list.</li
>
111 <?
createSubHeader("Creating a Forked Tree on repo.or.cz"); ?
>
113 <p
>The git repo site repo
.or.cz lets anyone create a forked tree based
114 off the official Barry repo
. This saves space on repo
.or.cz
, and
115 adds your fork to a
list at the bottom of the official Barry page
.</p
>
117 <p
>This way
, users
and developers can look at everyone
's changes and
118 test and mix them as needed.</p>
120 <p>To create a forked tree, visit the <a href="http://repo.or.cz/w/barry.git">
121 Barry repo</a> and click "fork" at the top.</p>
125 <? createSubHeader("Using the Mob Branch"); ?>
127 <p>The public git repository service at repo.or.cz provides an interesting
128 feature, which allows anyone to push to a "mob" branch of a repository,
129 if so configured by the admin.</p>
131 <p> It would go something like this:
133 # clone with mob user
134 git clone git+ssh://mob@repo.or.cz/srv/git/barry.git barry
137 git checkout -b mob origin/mob
138 git diff origin/master..mob # make sure master == mob
140 git add ... && git commit
142 <send email to the list, include the SHA1 sum of the commit>
146 <p> This is a novel idea, as well as a security risk for anyone who blindly
147 runs whatever is in the mob branch. Hence the recommended diff check
148 above, to make sure you're working on an official branch
.</p
>
150 <p
> The mob user can only push to the mob branch
, so all other branches
151 are read
-only
, and have been reviewed at least once by the project
154 <p
> But the mob branch frees people up to
use git
, who may not have
155 their own hosting
, or who may not want to bother setting up their
156 own git repo
. People can
use it to collaborate on a feature
as well
.
157 Let your imagination run wild
.</p
>
159 <p
>You can read more about the ideas behind the mob branch at
160 <a href
="http://repo.or.cz/h/mob.html">the repo
.or.cz mob page
</a
></p
>