Gang:
If you're going to send patches (and we love to receive them), please
1. Attach the file, instead of using cut & paste - reason is that email
clients have bad habits of chopping lines or adding extra breaks - which
renders the text unusable.
2. Please, PLEASE, use diff -U3 not any of the other options. The reason is
two fold:
* Without context, it can be hard manually to figure out where the
changes actually go without the context.
* Patch has a really, really bad habit of just slapping things where
you tell it when you use the other formats, even if that makes no sense.
Suppose I have this:
-------------------------------------------------------
if (a=b)
traceEvent();
a++;
-------------------------------------------------------
And you want to make it look like this:
-------------------------------------------------------
if (a=b)
traceEvent();
a++;
b++;
-------------------------------------------------------
So you send me this diff:
-------------------------------------------------------
3a4
> b++;
-------------------------------------------------------
The problem, of course is that in the mean time, I've changed the source to
this:
-------------------------------------------------------
if (a<b) traceEvent();
else
if (a=b)
traceEvent();
a++;
-------------------------------------------------------
And when I apply the patch file, I get this:
-------------------------------------------------------
if (a<b) traceEvent()
else
if (a=b)
b++;
traceEvent();
a++;
-------------------------------------------------------
Which compiles just fine, but doesn't do what either of us expects. With a
contextural diff, patch can figure out where to correctly insert the lines.
3. Don't put spurious blank lines, in there - it just adds to the diffs and
makes them harder to read (yeah, it does often make the code easier to read,
so this isn't an absolute prohibition - just please use some common sense).
TIA
-----Burton
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev