This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: contribute.html
> The enclosed patch ``legalizes'' current practice.
Unified or context diffs should still be required, and the '-p' option
also helps a lot.
Also, I found that post-processing of CVS diffs is necessary, as patch
might mess up with non-qualified file names. I use the script attached
below for that, which I got from Andreas Jäger (thanks again), who got
it from somebody else.
The only problem this has is if you are creating new files or removing
old one, I have yet to find a good way to make 'cvs diff' produce a
nice patch for that (and yes, I do use '-N').
Martin
#! /usr/bin/perl -wi
while (<>)
{
if (/^Index: (.*)/)
{
$full = $1;
($small) = ($full =~ m=.*/([^\t]*)=);
print;
$small || next;
for (1..4) { $_ = <>; print; }
for (1..2)
{
$_ = <>;
s/$small/$full/;
print;
}
}
else
{
print;
}
}