Date: Tue, 18 Aug 1998 16:17:22 +0300 (IDT) From: Eli Zaretskii To: "Gurunandan R. Bhat" cc: djgpp AT delorie DOT com Subject: Re: Canonical way to obtain diffs In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 16 Aug 1998, Gurunandan R. Bhat wrote: > What command line options must I give to diff if I am to submit > patches to programs in the djgpp distribution? diff -c old new > patch-file Please invoke this command from the root of your DJGPP installation, and have `old' and `new' in the above example be given with their full pathname relative to that root, and with *forward* slashes. For example: diff -c src/debug/common/syms.old src/debug/common/sysms.c > syms.pat Do NOT use any switches to `diff' that cause it ignore whitespace (the resulting patch will not apply without human intervention). It is also a good idea to run your patch file through DTOU before mailing it (unless your mailer is smart enough to convert the DOS-style CR-LF pairs for you). That's because DJ Delorie applies the patches on a Unix box, where `patch' doesn't necessarily understand DOS-style EOLs. > And conversely, how should patch be used to obtain newfile from distfile. patch -p0 -b < patch-file Again, this should be run from the root of the DJGPP installation. Please note that the above is NOT the only way that you can generate diffs and apply them. There are numerous other ways, each one of which will work under some circumstances. But by sticking to the above paradigm, you make sure that your patches will *always* work.