aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2014-04-03 17:48:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:21:06 -0400
commit8e3072a23ff8cf69b3e654a7cd64eae04f06a0e6 (patch)
treed8982ec14b2523428dfa4d9567fa5dcb826bd14d /Documentation
parent9547c706d279392d53922c0f9d57a0b37a4dfcdc (diff)
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/SubmittingPatches31
1 files changed, 16 insertions, 15 deletions
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 53e6590263a1..fdad7d197062 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -14,7 +14,10 @@ Read Documentation/SubmitChecklist for a list of items to check
14before submitting code. If you are submitting a driver, also read 14before submitting code. If you are submitting a driver, also read
15Documentation/SubmittingDrivers. 15Documentation/SubmittingDrivers.
16 16
17 17Many of these steps describe the default behavior of the git version
18control system; if you use git to prepare your patches, you'll find much
19of the mechanical work done for you, though you'll still need to prepare
20and document a sensible set of patches.
18 21
19-------------------------------------------- 22--------------------------------------------
20SECTION 1 - CREATING AND SENDING YOUR CHANGE 23SECTION 1 - CREATING AND SENDING YOUR CHANGE
@@ -25,7 +28,9 @@ SECTION 1 - CREATING AND SENDING YOUR CHANGE
251) "diff -up" 281) "diff -up"
26------------ 29------------
27 30
28Use "diff -up" or "diff -uprN" to create patches. 31Use "diff -up" or "diff -uprN" to create patches. git generates patches
32in this form by default; if you're using git, you can skip this section
33entirely.
29 34
30All changes to the Linux kernel occur in the form of patches, as 35All changes to the Linux kernel occur in the form of patches, as
31generated by diff(1). When creating your patch, make sure to create it 36generated by diff(1). When creating your patch, make sure to create it
@@ -66,19 +71,14 @@ Make sure your patch does not include any extra files which do not
66belong in a patch submission. Make sure to review your patch -after- 71belong in a patch submission. Make sure to review your patch -after-
67generated it with diff(1), to ensure accuracy. 72generated it with diff(1), to ensure accuracy.
68 73
69If your changes produce a lot of deltas, you may want to look into 74If your changes produce a lot of deltas, you need to split them into
70splitting them into individual patches which modify things in 75individual patches which modify things in logical stages; see section
71logical stages. This will facilitate easier reviewing by other 76#3. This will facilitate easier reviewing by other kernel developers,
72kernel developers, very important if you want your patch accepted. 77very important if you want your patch accepted.
73There are a number of scripts which can aid in this:
74
75Quilt:
76http://savannah.nongnu.org/projects/quilt
77 78
78Andrew Morton's patch scripts: 79If you're using git, "git rebase -i" can help you with this process. If
79http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz 80you're not using git, quilt <http://savannah.nongnu.org/projects/quilt>
80Instead of these scripts, quilt is the recommended patch management 81is another popular alternative.
81tool (see above).
82 82
83 83
84 84
@@ -607,7 +607,8 @@ patch.
607If you are going to include a diffstat after the "---" marker, please 607If you are going to include a diffstat after the "---" marker, please
608use diffstat options "-p 1 -w 70" so that filenames are listed from 608use diffstat options "-p 1 -w 70" so that filenames are listed from
609the top of the kernel source tree and don't use too much horizontal 609the top of the kernel source tree and don't use too much horizontal
610space (easily fit in 80 columns, maybe with some indentation). 610space (easily fit in 80 columns, maybe with some indentation). (git
611generates appropriate diffstats by default.)
611 612
612See more details on the proper patch format in the following 613See more details on the proper patch format in the following
613references. 614references.