Subject: How to make good patches?

From: Geir Johannessen <[email-masked]>
Date: Wed, 15 Oct 1997 12:29:24 +0200 (MET DST)

Hi

I have rewritten some code in wu-ftpd so it logs even the transferlogs to
syslog. Naturally I would like to apply this patch every time there is a
new release. So I tried to make a patchfile with diff:

diff -c -C 0 file.c file.c.orig

This works when the file is not changed from the previous release. But once
some linenumbers change it fails. What is the correct diff command (or
maybe there is another program)?

And is there a way to tell patch to make a new file containing some lines
without complaining about missing original file?

(I guess this is not the right place to ask such questions, but I reckon
there are a lot of people with experience that knows the answer.)

--
Geir Johannessen          #  [email-masked]
E B Schieldropsvei 35-25  #  http://www.stud.ntnu.no/~joge/
N-7033 TRONDHEIM, NORWAY  #  Tlf private +47-73888989, job +47-73598048
"A conscience does not prevent sin. It only prevents you from enjoying it."

---

From: Eilon Gishri <[email-masked]>
Date: Wed, 15 Oct 1997 15:11:09 +0200

> without complaining about missing original file?
Try ftp://ftp.gnu.ai.mit.edu/pub/gnu/patch-2.5.tar.gz you will also find
there the gnu diff in which you can use as follows:

diff -u --recursive --new-file <old dir/file> <new dir/file>

-- 
Eilon Gishri					[email-masked]
Security Consultant				Office: +972-3-6406723
Israel Inter University Computation Center	Fax:	+972-3-6409118
  /* On a matter of national security */	Home:	+972-3-5078671