Commit e768ae0e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] SubmittingPatches diffing update.

From: Zwane Mwaikambo <zwane@arm.linux.org.uk>

A kernel janitor recently got confused by the advice in SubmittingPatches
and was sending patches with the wrong strip level, i think just about
everyone would prefer standard patches.  Also mention various patch
management scripts for batching up large deltas.
parent 65782400
...@@ -35,13 +35,14 @@ not in any lower subdirectory. ...@@ -35,13 +35,14 @@ not in any lower subdirectory.
To create a patch for a single file, it is often sufficient to do: To create a patch for a single file, it is often sufficient to do:
SRCTREE= /devel/linux-2.4 SRCTREE= linux-2.4
MYFILE= drivers/net/mydriver.c MYFILE= drivers/net/mydriver.c
cd $SRCTREE cd $SRCTREE
cp $MYFILE $MYFILE.orig cp $MYFILE $MYFILE.orig
vi $MYFILE # make your change vi $MYFILE # make your change
diff -up $MYFILE.orig $MYFILE > /tmp/patch cd ..
diff -up $SRCTREE/$MYFILE{.orig,} > /tmp/patch
To create a patch for multiple files, you should unpack a "vanilla", To create a patch for multiple files, you should unpack a "vanilla",
or unmodified kernel source tree, and generate a diff against your or unmodified kernel source tree, and generate a diff against your
...@@ -63,6 +64,20 @@ Make sure your patch does not include any extra files which do not ...@@ -63,6 +64,20 @@ Make sure your patch does not include any extra files which do not
belong in a patch submission. Make sure to review your patch -after- belong in a patch submission. Make sure to review your patch -after-
generated it with diff(1), to ensure accuracy. generated it with diff(1), to ensure accuracy.
If your changes produce a lot of deltas, you may want to look into
splitting them into individual patches which modify things in
logical stages, this will facilitate easier reviewing by other
kernel developers, very important if you want your patch accepted.
There are a number of scripts which can aid in this;
Quilt:
http://savannah.nongnu.org/projects/quilt
Randy Dunlap's patch scripts:
http://developer.osdl.org/rddunlap/scripts/patching-scripts.tgz
Andrew Morton's patch scripts:
http://www.zip.com.au/~akpm/linux/patches/patch-scripts-0.16
2) Describe your changes. 2) Describe your changes.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment