Re: [PATCH] Rewrite Documentation/SubmittingPatches.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux