xref: /freebsd/contrib/ntp/README.pullrequests (revision 999c1fd64b489eda8c04f1e1529f828ebe5c7794)
1See README.hackers for notes on coding styles.
2
3The NTP project's github repository is at https://github.com/ntp-project/ntp.
4
5There are two branches, master and stable.
6
7The stable branch is the current supported production code branch, the
8ntp-stable code (even 2nd number).
9
10The master branch is for new development, also known as ntp-dev (which
11has an odd 2nd number).
12
13If you have some work you'd like to add, then if there is any interest
14in seeing that work in the current production release then base your work
15on the stable branch, and pull your work into a master copy to allow for
16publishing your changes in the ntp-dev or master branch.
17
18If there is no expectation that your work will be included in the
19current stable release (the ntp-stable code) then it's better to do your
20work on a copy of the master branch.
21
22Make sure that any changes you make to stable pull cleanly into master.
23
24It's possible that after pulling your changes from stable to master that
25some additional cleanup will be required in master.  Please do this.
26
27If you follow this method, then if you submit a pull request for either
28master or for master+stable, it will be easy for us to evaluate and
29incorporate your work.
30
31Please also note that your submissions will be able to be evaluated and
32handled sooner if the repo that contains your pull requests also includes
33test cases.
34
35The general workflow is as follows:
36
371) If you haven't, create a fork of ntp-project/ntp with your github account.
38   i) Log on to github.com with your github account.
39       - If you don't have one, create one first. (read: https://help.github.com/articles/signing-up-for-a-new-github-account)
40       - Make sure you also have a SSH key associated with your github account.
41         (read: https://help.github.com/articles/generating-ssh-keys/)
42   ii) Go to https://github.com/ntp-project/ntp
43   iii) On the top right corner, right below the header bar, there is
44        a button labeled "Fork".  Click on it.  This will fork the current
45	ntp master to your own account. Once done, it will go to your account's
46	version of the ntp repository. (Your fork of ntp source)
47   iv) Clone a local version of your fork.
48        - git clone git@github.com:<your_username>/ntp
49
502) Look through the bugs listed in the bug tracker: http://bugs.ntp.org/
51
523) Once you've found a bug to work on:
53
54   i) Create a branch off your own master branch of your local fork.
55      (the <branchname> can be any valid short string that will tell you
56       what you're working on)
57      - git checkout -b <branchname>
58
59   ii) Start working on the bug.
60   iii) When you create changes in the source, it would help you to
61        keep track of your changes by committing to your local repo.
62	(This way, every small change is tracked and when you've
63	 made a mistake, you can always go back.)
64	 - git commit -a -m "description of change"
65   iv) Once you are satisfied, you can push to your github account's
66       repository.
67         - git push origin <branchname>
68    v) (go to step iii).
69
704) Once you feel you've fixed the bug (and tested it), you need to
71   create a pull request on your branch on github.  (Read up on
72   pull requests @ https://help.github.com/articles/using-pull-requests)
73
74    i) Create your pullrequest by following the instructions @
75       https://help.github.com/articles/creating-a-pull-request/
76
775) Your pull request will be reviewed by committers and when it
78   passes review, it will be merged by the reviewer/allowed committer.
79
806) You have fixed a bug.  Goto step #2.
81
82If these patches are for a bugzilla issue, mark the issue as Resolved/READY
83with a comment of "Please pick up the patches from XXX" where XXX is
84something like:
85
86 hostname:~user/path	if it's a machine the reviewers have access to, or
87 github-pull-request-URI
88
89---
90
91