What's a Patch (a newbee asks)

Could someone tell me how I make a “Patch”?
What format, how to submit it, etc?

Thanks,
Pierre.

Could someone tell me how I make a “Patch”?
What format, how to submit it, etc?

A patch is the output of the unix diff utility.
So what does the diff utility, you ask ? :wink:
diff finds the difference between two trees, and makes them in a readable format.

Look at this one for example :
http://twomix.devolution.com/pipermail/sdl/2004-June/062835.html
Lines beggining with a “+” were added, lines beggining with a “-” were removed.

Let’s say you have two SDL source trees called SDL12.old and SDL12.new. To make a patch between those do the following :
diff -Naur SDL12.old SDL12.new > mypatch

To to the opposite, i.e. apply the patch to a source tree, you have to use the unix patch utility :
“patch < mypatch” or "patch -p1 < mypatch"
Thus the name.

So simply see the manpages for “diff” and “patch” if you want more info (especially be careful as to not include the .o files or such in our patch) . Also, even if you don’t use a unix system, these utilities are available in mingw.

Stephane

Thanks a lot Stephane!

“-Naur” is what I was looking for.

Now, how do you submit it?
Is it just an attachment to a post?

Pierre.> -----Original Message-----

From: sdl-bounces+pgr=jaxo.com at libsdl.org
[mailto:sdl-bounces+pgr=jaxo.com at libsdl.org]On Behalf Of Stephane
Marchesin
Sent: Wednesday, July 28, 2004 11:44 AM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] What’s a Patch (a newbee asks)

Could someone tell me how I make a “Patch”?
What format, how to submit it, etc?

A patch is the output of the unix diff utility.
So what does the diff utility, you ask ? :wink:
diff finds the difference between two trees, and makes them in a
readable format.

Look at this one for example :
http://twomix.devolution.com/pipermail/sdl/2004-June/062835.html
Lines beggining with a “+” were added, lines beggining with a "-"
were removed.

Let’s say you have two SDL source trees called SDL12.old and
SDL12.new. To make a patch between those do the following :
diff -Naur SDL12.old SDL12.new > mypatch

To to the opposite, i.e. apply the patch to a source tree, you
have to use the unix patch utility :
“patch < mypatch” or "patch -p1 < mypatch"
Thus the name.

So simply see the manpages for “diff” and “patch” if you want
more info (especially be careful as to not include the .o files
or such in our patch) . Also, even if you don’t use a unix
system, these utilities are available in mingw.

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Pierre G. Richard wrote:

Thanks a lot Stephane!

“-Naur” is what I was looking for.

Now, how do you submit it?
Is it just an attachment to a post?

Yes, provided you remember the 20Kb filter :wink:

Stephane