Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SubmittingPatches: document the use of git

Most of the mechanical portions of SubmittingPatches exist to help patch
submitters replicate the output of git. Mention this explicitly, both
as a reminder that git will help with this process, and as signposting
to let git users know what they can safely skip.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Borislav Petkov <bp@suse.de>
Cc: Rob Landley <rob@landley.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Josh Triplett and committed by
Linus Torvalds
8e3072a2 9547c706

+16 -15
+16 -15
Documentation/SubmittingPatches
··· 14 14 before submitting code. If you are submitting a driver, also read 15 15 Documentation/SubmittingDrivers. 16 16 17 - 17 + Many of these steps describe the default behavior of the git version 18 + control system; if you use git to prepare your patches, you'll find much 19 + of the mechanical work done for you, though you'll still need to prepare 20 + and document a sensible set of patches. 18 21 19 22 -------------------------------------------- 20 23 SECTION 1 - CREATING AND SENDING YOUR CHANGE ··· 28 25 1) "diff -up" 29 26 ------------ 30 27 31 - Use "diff -up" or "diff -uprN" to create patches. 28 + Use "diff -up" or "diff -uprN" to create patches. git generates patches 29 + in this form by default; if you're using git, you can skip this section 30 + entirely. 32 31 33 32 All changes to the Linux kernel occur in the form of patches, as 34 33 generated by diff(1). When creating your patch, make sure to create it ··· 71 66 belong in a patch submission. Make sure to review your patch -after- 72 67 generated it with diff(1), to ensure accuracy. 73 68 74 - If your changes produce a lot of deltas, you may want to look into 75 - splitting them into individual patches which modify things in 76 - logical stages. This will facilitate easier reviewing by other 77 - kernel developers, very important if you want your patch accepted. 78 - There are a number of scripts which can aid in this: 69 + If your changes produce a lot of deltas, you need to split them into 70 + individual patches which modify things in logical stages; see section 71 + #3. This will facilitate easier reviewing by other kernel developers, 72 + very important if you want your patch accepted. 79 73 80 - Quilt: 81 - http://savannah.nongnu.org/projects/quilt 82 - 83 - Andrew Morton's patch scripts: 84 - http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz 85 - Instead of these scripts, quilt is the recommended patch management 86 - tool (see above). 74 + If you're using git, "git rebase -i" can help you with this process. If 75 + you're not using git, quilt <http://savannah.nongnu.org/projects/quilt> 76 + is another popular alternative. 87 77 88 78 89 79 ··· 607 607 If you are going to include a diffstat after the "---" marker, please 608 608 use diffstat options "-p 1 -w 70" so that filenames are listed from 609 609 the top of the kernel source tree and don't use too much horizontal 610 - space (easily fit in 80 columns, maybe with some indentation). 610 + space (easily fit in 80 columns, maybe with some indentation). (git 611 + generates appropriate diffstats by default.) 611 612 612 613 See more details on the proper patch format in the following 613 614 references.