From: Borislav Petkov <bp@alien8.de>
To: Stefan Beller <stefanbeller@googlemail.com>
Cc: Rob Landley <rob@landley.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Rewrite Documentation/SubmittingPatches.
Date: Fri, 13 Jul 2012 14:33:15 +0200 [thread overview]
Message-ID: <20120713123314.GB10298@x1.osrc.amd.com> (raw)
In-Reply-To: <CALbm-EbggDYBwEDmo6bjEO_=p0YEmLHASNkfAN5J-P4-mT-vgg@mail.gmail.com>
On Fri, Jul 13, 2012 at 01:51:50PM +0200, Stefan Beller wrote:
> This updates the documentation on how to create patches and send
> these to the kernel mailing list.
>
> The documentation before was written in times before git was there,
> so the crafting of the patch needed to be done manually by diff -up
> in the right directory.
>
> This patch aims at simplifying the patch sending process, without
> breaking the output results.
>
> A discussion with gregkh can be found at
> https://plus.google.com/111049168280159033135/posts/ekAxK9achsA
>
> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
> ---
> Documentation/SubmittingPatches | 135 ++++++++++++++++++---------------------
> 1 files changed, 63 insertions(+), 72 deletions(-)
>
> diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
> index c379a2a..966db54 100644
> --- a/Documentation/SubmittingPatches
> +++ b/Documentation/SubmittingPatches
> @@ -22,55 +22,21 @@ SECTION 1 - CREATING AND SENDING YOUR CHANGE
>
>
>
> -1) "diff -up"
> +1) Using git
> ------------
>
> -Use "diff -up" or "diff -uprN" to create patches.
> +Use the distributed version control git to commit your changes
> +into your local git repository.
>
> -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).
> -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:
> -
> - SRCTREE= linux-2.6
> - MYFILE= drivers/net/mydriver.c
> -
> - cd $SRCTREE
> - cp $MYFILE $MYFILE.orig
> - vi $MYFILE # make your change
> - 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
> -own source tree. For example:
> -
> - MYSRC= /devel/linux-2.6
> -
> - tar xvfz linux-2.6.12.tar.gz
> - mv linux-2.6.12 linux-2.6.12-vanilla
> - diff -uprN -X linux-2.6.12-vanilla/Documentation/dontdiff \
> - linux-2.6.12-vanilla $MYSRC > /tmp/patch
> -
> -"dontdiff" is a list of files which are generated by the kernel during
> -the build process, and should be ignored in any diff(1)-generated
> -patch. The "dontdiff" file is included in the kernel tree in
> -2.6.12 and later. For earlier kernel versions, you can get it
> -from <http://www.xenotime.net/linux/doc/dontdiff>.
> -
> -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-
> -generated it with diff(1), to ensure accuracy.
Can we keep this at the end of the document and call it "Creating
patches - the obsolete way" or similar, as a backup for people who can't
use git for whatever reasons?
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2012-07-13 12:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 11:51 Stefan Beller
2012-07-13 12:33 ` Borislav Petkov [this message]
2012-07-13 14:09 ` Jeff Garzik
2012-07-13 14:45 ` Stefan Beller
2012-07-15 20:59 ` Rob Landley
2012-07-16 6:20 ` Stefan Beller
2012-07-16 15:06 ` Randy Dunlap
2012-08-13 16:02 ` [PATCH v2] " Stefan Beller
2012-07-25 23:41 ` [PATCH] " Junio C Hamano
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=20120713123314.GB10298@x1.osrc.amd.com \
--to=bp@alien8.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=stefanbeller@googlemail.com \
/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®