From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933234Ab2GMMdV (ORCPT ); Fri, 13 Jul 2012 08:33:21 -0400 Received: from mail.skyhub.de ([78.46.96.112]:40312 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933061Ab2GMMdS (ORCPT ); Fri, 13 Jul 2012 08:33:18 -0400 Date: Fri, 13 Jul 2012 14:33:15 +0200 From: Borislav Petkov To: Stefan Beller Cc: Rob Landley , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Rewrite Documentation/SubmittingPatches. Message-ID: <20120713123314.GB10298@x1.osrc.amd.com> Mail-Followup-To: Borislav Petkov , Stefan Beller , Rob Landley , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 . > - > -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.