Allow Git repository to be pre-filled from clipboard
[egit.git] / SUBMITTING_PATCHES
blob581e2e9db6e76af012b2a05540d8850adfc6a285
1 Short Version:
3  - Make small logical changes.
4  - Provide a meaningful commit message.
6  - Review and follow the Eclipse Due Diligence Process
8      http://www.eclipse.org/projects/dev_process/ip-process-in-cartoons.php
9      http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf
11  - Review and follow the current guidelines:
13      http://wiki.eclipse.org/EGit/Contributor_Guide
16 Long Version:
18 I wanted a file describing how to submit patches for EGit,
19 so I started with the one found in the core Git distribution
20 (Documentation/SubmittingPatches), which itself was based on the
21 patch submission guidelines for the Linux kernel.
23 However there are quite a few differences, so please review and
24 familiarize yourself with the following relevant bits:
27 (1) Make separate commits for logically separate changes.
29 Unless your patch is really trivial, you should not be sending
30 out a patch that was generated between your working tree and your
31 commit head.  Instead, always make a commit with complete commit
32 message and generate a series of patches from your repository.
33 It is a good discipline.
35 Describe the technical detail of the change(s).
37 If your description starts to get too long, that's a sign that you
38 probably need to split up your commit to finer grained pieces.
40 I am very picky about formatting.  Make sure your final version
41 of every file was formatted using the Eclipse code formatter
42 using the project specific settings (Properties->Java Code
43 Style->Formatter->"Java Conventions [built-in]").
46 (2) Generate your patch using git tools out of your commits.
48 git based diff tools (git, and StGIT included) generate unidiff,
49 which is the only acceptable format.
51 You do not have to be afraid to use -M option to "git diff" or "git
52 format-patch", if your patch involves file renames.  The receiving
53 end can handle them just fine.
55 Please make sure your patch does not include any extra files which
56 do not belong in a patch submission.  Make sure to review your
57 patch after generating it, to ensure accuracy.  Before sending out,
58 please make sure it cleanly applies to the "master" branch head.
61 (3) Check the license.
63 EGit is licensed under the Eclipse Public License (EPL).
65 Under this licensing model *every* file within the project
66 *must* list which license covers it in the header of the file.
67 Any new contributions to an existing file *must* be submitted under
68 the current license of that file.  Any new files *must* clearly
69 indicate which license they are provided under in the file header.
71 Please verify that you are legally allowed and willing to submit your
72 changes under the license covering each file *prior* to submitting
73 your patch.  It is virtually impossible to remove a patch once it
74 has been applied and pushed out.
77 (4) Review the Eclipse Due Diligence Process.
79   http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf
82 (5) Sending your patches.
84 "git format-patch" command follows the best current practice to
85 format a commit as a reviewable text message.
87 At the beginning of the patch should come your commit message,
88 a line that consists of three dashes, followed by the diffstat
89 information and the patch itself.  If you are forwarding a patch
90 from somebody else, optionally, at the beginning of the e-mail
91 message just before the commit message starts, you can put a "From:
92 " line to name that person.
94 You often want to add additional explanation about the patch,
95 other than the commit message itself.  Place such "cover letter"
96 material between the three dash lines and the diffstat, or please
97 place it in the bug description itself.
99 Open a new bug on the Eclipse bug tracker on the EGit project:
101   https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EGit
103 Attach the mailbox file(s) created by "git format-patch" to the bug.