[PATCH][2.6] SubmittingPatches diffing update.

From: Zwane Mwaikambo
Date: Sat Apr 24 2004 - 11:22:37 EST


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.

Index: linux-2.6.6-rc1-stage/Documentation/SubmittingPatches
===================================================================
RCS file: /home/cvsroot/linux-2.6.6-rc1/Documentation/SubmittingPatches,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 SubmittingPatches
--- linux-2.6.6-rc1-stage/Documentation/SubmittingPatches 15 Apr 2004 19:33:08 -0000 1.1.1.1
+++ linux-2.6.6-rc1-stage/Documentation/SubmittingPatches 23 Apr 2004 17:55:46 -0000
@@ -35,13 +35,14 @@ not in any lower subdirectory.

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

cd $SRCTREE
cp $MYFILE $MYFILE.orig
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",
or unmodified kernel source tree, and generate a diff against your
@@ -63,6 +64,20 @@ Make sure your patch does not include an
belong in a patch submission. Make sure to review your patch -after-
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/