2005-03-05 16:00:14

by Gene Heskett

[permalink] [raw]
Subject: diff command line?

Greetings;

What are the options normally used to generate a diff for public
consumption on this list?

The -???? stuffs is what I'm looking for.

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.


2005-03-05 16:30:04

by Russell King

[permalink] [raw]
Subject: Re: diff command line?

On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
> What are the options normally used to generate a diff for public
> consumption on this list?

diff -urpN orig new

where "orig" and "new" both contain the top level "linux" directory,
so the resulting patch can be applied with patch -p1.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-03-05 16:36:51

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: diff command line?

On Saturday 05 March 2005 17:48, Gene Heskett wrote:
> What are the options normally used to generate a diff for public
> consumption on this list?
>
> The -???? stuffs is what I'm looking for.

Documentation/SubmittingPatches section 1.1.

-up or -uprN for tree vs tree.

Alexey

2005-03-05 16:54:45

by James Nelson

[permalink] [raw]
Subject: Re: diff command line?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Russell King wrote:
| On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
|
|>What are the options normally used to generate a diff for public
|>consumption on this list?
|
|
| diff -urpN orig new
|
| where "orig" and "new" both contain the top level "linux" directory,
| so the resulting patch can be applied with patch -p1.
|

You'd also want to add "-x dontdiff", using

http://developer.osdl.org/rddunlap/scripts/dontdiff-osdl

That way, you can do a diff, even if you have run a compile in one of the
directory trees.

- --
GPG Public key at pgp.mit.edu

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCKeIZevfmjTWdv3MRAjPYAJ9s3PrU/hjuILrGlIh3nuO/Scd4TACghQwQ
WD5p8VRpp6mfI+b+FOHZIn0=
=n8/k
-----END PGP SIGNATURE-----

2005-03-05 16:54:49

by Gene Heskett

[permalink] [raw]
Subject: Re: diff command line?

On Saturday 05 March 2005 11:18, Russell King wrote:
>On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
>> What are the options normally used to generate a diff for public
>> consumption on this list?
>
>diff -urpN orig new
>
>where "orig" and "new" both contain the top level "linux" directory,
>so the resulting patch can be applied with patch -p1.

Which means the patch I just submitted is wrong, I made it while cd'd
to the 2.6.11 tree. Damn. I'll remake & resubmit.

Thanks

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.

2005-03-05 17:18:06

by Gene Heskett

[permalink] [raw]
Subject: Re: diff command line?

On Saturday 05 March 2005 11:45, Jim Nelson wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Russell King wrote:
>| On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
>|>What are the options normally used to generate a diff for public
>|>consumption on this list?
>|
>| diff -urpN orig new
>|
>| where "orig" and "new" both contain the top level "linux"
>| directory, so the resulting patch can be applied with patch -p1.
>
>You'd also want to add "-x dontdiff", using
>
>http://developer.osdl.org/rddunlap/scripts/dontdiff-osdl
>
>That way, you can do a diff, even if you have run a compile in one
> of the directory trees.

And this is a list of files to ignore. In the previous case, only one
file, but I can see thats a very good way to weed out the noise.
Thanks.

>- --
>GPG Public key at pgp.mit.edu
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.4 (GNU/Linux)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFCKeIZevfmjTWdv3MRAjPYAJ9s3PrU/hjuILrGlIh3nuO/Scd4TACghQwQ
>WD5p8VRpp6mfI+b+FOHZIn0=
>=n8/k
>-----END PGP SIGNATURE-----

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.

2005-03-05 17:17:58

by Kyle McMartin

[permalink] [raw]
Subject: Re: diff command line?

On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
> Greetings;
>
> What are the options normally used to generate a diff for public
> consumption on this list?
>
> The -???? stuffs is what I'm looking for.
>

linux/Documentation/SubmittingPatches

2005-03-07 10:52:08

by Michelle Konzack

[permalink] [raw]
Subject: Re: diff command line?

Hello Russell,

Am 2005-03-05 16:18:24, schrieb Russell King:
> On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
> > What are the options normally used to generate a diff for public
> > consumption on this list?
>
> diff -urpN orig new

This is what I using curently

diff -Nurp src.orig/linux src/linux >src.diff/linux

Now I have a question: How can one create this Type of patches ?
(Curently I am using scripts to strip "src.orig" and "src")

Index: linux-sd/include/linux/mmc/host.h
===================================================================
--- linux-sd/include/linux/mmc/host.h (revision 138)
+++ linux-sd/include/linux/mmc/host.h (working copy)
@@ -51,6 +51,11 @@
#define MMC_POWER_OFF 0


I was searching the commandline parameters for it...
(using Debian GNU/Linux)

Thanks
Michelle

--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)


Attachments:
(No filename) (1.06 kB)
signature.pgp (189.00 B)
Digital signature
Download all attachments

2005-03-07 14:13:55

by Catalin Marinas

[permalink] [raw]
Subject: Re: diff command line?

Michelle Konzack <[email protected]> wrote:
> Am 2005-03-05 16:18:24, schrieb Russell King:
>> On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
>> > What are the options normally used to generate a diff for public
>> > consumption on this list?
>>
>> diff -urpN orig new
>
> This is what I using curently
>
> diff -Nurp src.orig/linux src/linux >src.diff/linux
>
> Now I have a question: How can one create this Type of patches ?
> (Curently I am using scripts to strip "src.orig" and "src")

Two ways:
$ mv src.orig/linux linux.orig
$ mv src/linux linux
$ diff -Nurp linux.orig linux

or
$ diff -Nurp src.orig/linux src/linux | filterdiff --strip=1

Catalin

2005-03-07 15:08:52

by Michelle Konzack

[permalink] [raw]
Subject: Re: diff command line?

Am 2005-03-07 14:13:50, schrieb Catalin Marinas:

> Two ways:

not realy good... :-)


> or
> $ diff -Nurp src.orig/linux src/linux | filterdiff --strip=1

Perfectly... This is what I was searching for...

Because I have original source "src.orig" on one HDD
and my working directory "src" on another.

Now all is working like expected.

> Catalin

Greetings
Michelle

--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)


Attachments:
(No filename) (636.00 B)
signature.pgp (189.00 B)
Digital signature
Download all attachments

2005-03-09 04:23:23

by John Kacur

[permalink] [raw]
Subject: [PATCH][Documentation update]Re: diff command line?

On Sat, 2005-03-05 at 11:45, Jim Nelson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Russell King wrote:
> | On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
> |
> |>What are the options normally used to generate a diff for public
> |>consumption on this list?
> |
> |
> | diff -urpN orig new
> |
> | where "orig" and "new" both contain the top level "linux" directory,
> | so the resulting patch can be applied with patch -p1.
> |
>
> You'd also want to add "-x dontdiff", using
>
> http://developer.osdl.org/rddunlap/scripts/dontdiff-osdl
>
> That way, you can do a diff, even if you have run a compile in one of the
> directory trees.

Hey, why isn't that is the documentation? I didn't hear of it until now.
Is this what most developers are using for 2.6, if so then we need the
following trivial documentation update. Created against the Docs in
2.6.11

--- SubmittingPatches.orig 2005-03-08 23:09:19.496223848 -0500
+++ SubmittingPatches 2005-03-08 23:18:52.192160832 -0500
@@ -60,6 +60,9 @@
the build process, and should be ignored in any diff(1)-generated
patch. dontdiff is maintained by Tigran Aivazian <[email protected]>

+For 2.6 kernels you can fetch dontdiff-osdl maintained by Randy Dunlap.
+wget http://developer.osdl.org/rddunlap/scripts/dontdiff-osdl
+