Mail Archives: djgpp/1998/08/17/13:16:02
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 -