Improve readability of version string
[TortoiseGit.git] / doc / HowToContribute.txt
blob14907fe2d7ca5dce113bde1c293c7d2a03acad37
1 Checklist (and a short version for the impatient):\r
2 \r
3 Please also see https://tortoisegit.org/contribute/!\r
4 \r
5         Commits:\r
6 \r
7         - make commits of (small) logical units\r
8         - check for unnecessary whitespace with "git diff --check"\r
9           before committing\r
10         - do not check in commented out code or unneeded files\r
11         - the first line of the commit message should be a short\r
12           description and should skip the full stop. If it is about a\r
13           bug report/issue, prepend "Fixed issue #NUMBER: " to the subject.\r
14         - the body should provide a meaningful commit message, which:\r
15           . explains the problem the change tries to solve, iow, what\r
16             is wrong with the current code without the change.\r
17           . justifies the way the change solves the problem, iow, why\r
18             the result with the change is better.\r
19           . alternate solutions considered but discarded, if any.\r
20         - describe changes in imperative mood, e.g. "make xyzzy do frotz"\r
21           instead of "[This patch] makes xyzzy do frotz" or "[I] changed\r
22           xyzzy to do frotz", as if you are giving orders to the codebase\r
23           to change its behaviour.\r
24         - try to make sure your explanation can be understood without\r
25           external resources. Instead of giving a URL to a mailing list\r
26           archive, summarize the relevant points of the discussion.\r
27         - add a "Signed-off-by: Your Name <you@example.com>" line to the\r
28           commit message (or just use the option "-s" when committing)\r
29           to confirm that you agree to the Developer's Certificate of Origin\r
31         Submission:\r
33         - open an issue on https://tortoisegit.org/issues or go to an\r
34           issue you want to fix. Then you have one of the following options:\r
35           . attach a patch there\r
36           . provide a link to a branch you want the maintainers to pull from\r
37           . open a GitLab merge request and put the link into the issue\r
38           . open a GitHub pull request and put the link into the issue\r
40         For exisiting issues it is recommended to start commenting on the issue\r
41         in order to discuss possible solutions before starting coding.\r
43 Longer version:\r
45 (0) Make separate commits for logically separate changes.\r
47 Unless your patch is really trivial, you should not be sending\r
48 out a patch that was generated between your working tree and\r
49 your commit head.  Instead, always make a commit with complete\r
50 commit message and generate a series of patches from your\r
51 repository.\r
53 Give an explanation for the change(s) that is detailed enough so\r
54 that people can judge if it is good thing to do, without reading\r
55 the actual patch text to determine how well the code does what\r
56 the explanation promises to do.\r
58 If your description starts to get too long, that's a sign that you\r
59 probably need to split up your commit to finer grained pieces.\r
60 That being said, patches which plainly describe the things that\r
61 help reviewers check the patch, and future maintainers understand\r
62 the code, are the most beautiful patches.  Descriptions that summarise\r
63 the point in the subject well, and describe the motivation for the\r
64 change, the approach taken by the change, and if relevant how this\r
65 differs substantially from the prior version, are all good things\r
66 to have.\r
68 Oh, another thing. We are picky about whitespaces. To help ensure this\r
69 does not happen, run git diff --check on your changes before you commit.\r
72 (1a) Generate your patch using git tools out of your commits (Patch serial)\r
74 git based diff tools generate unidiff which is the preferred format.\r
76 Please make sure your patch does not include any extra files\r
77 which do not belong in a patch submission.  Make sure to review\r
78 your patch after generating it, to ensure accuracy.  Before\r
79 sending out, please make sure it cleanly applies to the "master"\r
80 branch head.\r
83 (1b) Create a merge/pull request\r
85 Push your changes to a public repository. Use a brief branch name\r
86 describing your changes.\r
88 Please make sure your pull request does not include any extra files\r
89 which do not belong in a submission.  Make sure to review your patch\r
90 after generating it, to ensure accuracy.\r
92 There is no need to generate a "formal" pull request. The URL and\r
93 branchname is necessary - or create a GitLab merge request\r
94 (https://gitlab.com/tortoisegit/tortoisegit/) or a GitHub pull request\r
95 (https://github.com/TortoiseGit).\r
98 (2) Sign your work\r
100 To improve tracking of who did what, we've borrowed the\r
101 "sign-off" procedure from the Linux kernel project on patches\r
102 that are being emailed around.  Although TortoiseGit is a lot\r
103 smaller project it is a good discipline to follow it.\r
105 The sign-off is a simple line at the end of the explanation for\r
106 the patch, which certifies that you wrote it or otherwise have\r
107 the right to pass it on as a open-source patch.  The rules are\r
108 pretty simple: if you can certify the below:\r
110         Developer's Certificate of Origin 1.1\r
112         By making a contribution to this project, I certify that:\r
114         (a) The contribution was created in whole or in part by me and I\r
115             have the right to submit it under the open source license\r
116             indicated in the file; or\r
118         (b) The contribution is based upon previous work that, to the best\r
119             of my knowledge, is covered under an appropriate open source\r
120             license and I have the right under that license to submit that\r
121             work with modifications, whether created in whole or in part\r
122             by me, under the same open source license (unless I am\r
123             permitted to submit under a different license), as indicated\r
124             in the file; or\r
126         (c) The contribution was provided directly to me by some other\r
127             person who certified (a), (b) or (c) and I have not modified\r
128             it.\r
130         (d) I understand and agree that this project and the contribution\r
131             are public and that a record of the contribution (including all\r
132             personal information I submit with it, including my sign-off) is\r
133             maintained indefinitely and may be redistributed consistent with\r
134             this project or the open source license(s) involved.\r
136 then you just add a line saying\r
138         Signed-off-by: Random J Developer <random@developer.example.org>\r
140 This line can be automatically added by Git and TortoiseGit.\r
142 Also notice that a real name is used in the Signed-off-by: line. Please\r
143 don't hide your real name.\r
145 If you like, you can put extra tags at the end:\r
147 1. "Reported-by:" is used to credit someone who found the bug that\r
148    the patch attempts to fix.\r
149 2. "Acked-by:" says that the person who is more familiar with the area\r
150    the patch attempts to modify liked the patch.\r
151 3. "Reviewed-by:", unlike the other tags, can only be offered by the\r
152    reviewer and means that she is completely satisfied that the patch\r
153    is ready for application.  It is usually offered only after a\r
154    detailed review.\r
155 4. "Tested-by:" is used to indicate that the person applied the patch\r
156    and found it to have the desired effect.\r
158 You can also create your own tag or use one that's in common usage\r
159 such as "Thanks-to:", "Based-on-patch-by:", or "Mentored-by:".\r
161 ------------------------------------------------\r
162 An ideal patch flow\r
164 Here is an ideal patch flow for this project the current maintainer\r
165 suggests to the contributors:\r
167  (0) You come up with an itch.  You code it up.\r
168      For exisiting issues it is recommended to start commenting on the issue\r
169      in order to discuss possible solutions before starting coding.\r
171  (1) Open an issue on https://tortoisegit.org/issues or attach\r
172      your changes to another already reported issue. Attach the patches\r
173      or provide a merge/pull request (URL branch) there.\r
175  (2) You get comments and suggestions for improvements.  You may\r
176      even get them in a "on top of your change" patch form.\r
178  (3) Polish, refine, and re-send.  Go back to step (2).\r
180  (4) The patch will be applied to master.\r