From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix Documentation/SubmittingPatches to use -p
Date: Thu, 08 Jan 2004 15:42:58 -0800 [thread overview]
Message-ID: <6550000.1073605378@[10.10.2.4]> (raw)
Patches are a damned sight easier to read if people use the '-p'
option to diff ... this generates output that looks like this:
"@@ -323,6 +323,7 @@ void put_dirty_page(struct task_struct *"
for each block. This patch simply adds that to the documentation
file, in the hope of steering new users in the right direction.
diff -aurpN -X /home/fletch/.diff.exclude virgin/Documentation/SubmittingPatches SubPatch/Documentation/SubmittingPatches
--- virgin/Documentation/SubmittingPatches Tue Aug 5 19:59:11 2003
+++ SubPatch/Documentation/SubmittingPatches Thu Jan 8 15:40:08 2004
@@ -20,16 +20,18 @@ SECTION 1 - CREATING AND SENDING YOUR CH
-1) "diff -u"
+1) "diff -up"
------------
-Use "diff -u" or "diff -urN" to create patches.
+Use "diff -up" or "diff -uprN" to create patches.
All changes to the Linux kernel occur in the form of patches, as
generated by diff(1). When creating your patch, make sure to create it
in "unified diff" format, as supplied by the '-u' argument to diff(1).
-Patches should be based in the root kernel source directory, not in
-any lower subdirectory.
+Also, please use the '-p' argument which shows which C function each
+change is in - that makes the resultant diff a lot easier to read.
+Patches should be based in the root kernel source directory,
+not in any lower subdirectory.
To create a patch for a single file, it is often sufficient to do:
@@ -39,7 +41,7 @@ To create a patch for a single file, it
cd $SRCTREE
cp $MYFILE $MYFILE.orig
vi $MYFILE # make your change
- diff -u $MYFILE.orig $MYFILE > /tmp/patch
+ diff -up $MYFILE.orig $MYFILE > /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
@@ -50,7 +52,7 @@ own source tree. For example:
tar xvfz linux-2.4.0-test11.tar.gz
mv linux linux-vanilla
wget http://www.moses.uklinux.net/patches/dontdiff
- diff -urN -X dontdiff linux-vanilla $MYSRC > /tmp/patch
+ diff -uprN -X dontdiff linux-vanilla $MYSRC > /tmp/patch
rm -f dontdiff
"dontdiff" is a list of files which are generated by the kernel during
reply other threads:[~2004-01-08 23:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='6550000.1073605378@[10.10.2.4]' \
--to=mbligh@aracnet.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®