Skip to content

Commit 8e3072a

Browse files
joshtripletttorvalds
authored andcommitted
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>
1 parent 9547c70 commit 8e3072a

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

‎Documentation/SubmittingPatches‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ Read Documentation/SubmitChecklist for a list of items to check
1414
before submitting code. If you are submitting a driver, also read
1515
Documentation/SubmittingDrivers.
1616

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.
1821

1922
--------------------------------------------
2023
SECTION 1 - CREATING AND SENDING YOUR CHANGE
@@ -25,7 +28,9 @@ SECTION 1 - CREATING AND SENDING YOUR CHANGE
2528
1) "diff -up"
2629
------------
2730

28-
Use "diff -up" or "diff -uprN" to create patches.
31+
Use "diff -up" or "diff -uprN" to create patches. git generates patches
32+
in this form by default; if you're using git, you can skip this section
33+
entirely.
2934

3035
All changes to the Linux kernel occur in the form of patches, as
3136
generated 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
6671
belong in a patch submission. Make sure to review your patch -after-
6772
generated it with diff(1), to ensure accuracy.
6873

69-
If your changes produce a lot of deltas, you may want to look into
70-
splitting them into individual patches which modify things in
71-
logical stages. This will facilitate easier reviewing by other
72-
kernel developers, very important if you want your patch accepted.
73-
There are a number of scripts which can aid in this:
74-
75-
Quilt:
76-
http://savannah.nongnu.org/projects/quilt
74+
If your changes produce a lot of deltas, you need to split them into
75+
individual patches which modify things in logical stages; see section
76+
#3. This will facilitate easier reviewing by other kernel developers,
77+
very important if you want your patch accepted.
7778

78-
Andrew Morton's patch scripts:
79-
http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz
80-
Instead of these scripts, quilt is the recommended patch management
81-
tool (see above).
79+
If you're using git, "git rebase -i" can help you with this process. If
80+
you're not using git, quilt <http://savannah.nongnu.org/projects/quilt>
81+
is another popular alternative.
8282

8383

8484

@@ -607,7 +607,8 @@ patch.
607607
If you are going to include a diffstat after the "---" marker, please
608608
use diffstat options "-p 1 -w 70" so that filenames are listed from
609609
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.)
611612

612613
See more details on the proper patch format in the following
613614
references.

0 commit comments

Comments
 (0)