delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/17/13:16:02

From: myknees AT aol DOT com (Myknees)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Canonical way to obtain diffs
Lines: 31
Message-ID: <1998081717141300.NAA25169@ladder01.news.aol.com>
NNTP-Posting-Host: ladder01.news.aol.com
Date: 17 Aug 1998 17:14:13 GMT
References: <Pine DOT LNX DOT 3 DOT 91 DOT 980816161403 DOT 2903A-100000 AT aditya DOT unigoa DOT ernet DOT in>
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <Pine DOT LNX DOT 3 DOT 91 DOT 980816161403 DOT 2903A-100000 AT aditya DOT unigoa DOT ernet DOT in>,
"Gurunandan R. Bhat" <grbhat AT unigoa DOT ernet DOT in> writes:

>	What command line options must I give to diff if I am to submit
>patches to programs in the djgpp distribution? 

If I remember what they (mostly Nate Eldridge) told me,
diff -c foo.old foo.c >foo.dif

>For example if "distfile" is the distributed file and "newfile" is the
>file that I have incorporated the changes in, what order and with what
>options must they appear on the diff command line. 

That's the way I did it at first, and they said, no--it is more convenient for
everyone if you rename the old file and have the newer version with the proper
name, so it would be "oldfile" and "distfile", in your example, and "distfile"
would have your new changes.
diff -c oldfile distfile >distfile.dif

>And conversely, how should patch be used to obtain newfile from distfile. 

patch -p0 -b <distfile.dif
As long as you created the diff from the same directory that people are going
to apply the diff from, they can use the -p0 switch to keep the paths that are
recorded in your diff.  The -b switch makes backups of the files that are being
patched.

But you should also read the documentation if you haven't already.  There is
some stuff in info.

--Ed (Myknees)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019