Why are unified diffs only "grudgingly" accepted?

François Pinard pinard at iro.umontreal.ca
Sun Aug 6 09:37:47 EDT 2000


[Moshe Zadka]

> >     We like context diffs. We grudgingly accept unified diffs.
> >     Straight ("ed-style") diffs are right out!

> > I understand why ed-style diffs are out, but why the are context diffs
> > favoured over unified? I've always found unified (-u) diffs to be
> > infinitely easier to read (by human eyes/brain) than context (-c) diffs.

> Guido doesn't. That's reason enough really -- it's the same as asking
> "why should I follow the Python style guidelines?": no real reason for
> that style, but Guido likes it, and there has to be some consistency.

I understand that `ed-style' diffs are hardly useful, and that we can
expect users to understand this.  However, between `-c' and `-u' lies
a matter of preference, and I always found sad having to know that this
maintainer strictly prefers `-u', while this other strictly prefers `-c'.
When one relates with many maintainers, it becomes pretty cumbersome to
remember the little mania and methods for each of them.

As I wrote a few times in the past, it progressively becomes more difficult
for users to report bugs than it used to be, and this is not good news to me,
as it taints a tiny bit the pleasure of using free software.  It also conveys
the message that our-maintainer-time-is-so-precious-that-yours-is-not-really.
I'm a maintainer and a user; and I care about my time whatever hat I bear!

For my correspondents, I hardly know their situation, but I avoid thinking
that my time is necessarily more precious than theirs.  Of course, I may
object to unreasonable demands once in a while, but my tolerance level allows
for some slack.  I wish some maintainers be a little less self-centered.

Back to the diff-style affair, I got a program `unify' from Wayne Davison
(Borland) which I integrated into `wdiff' (as the `diffutils' maintainer
was sadly not interested).  This program converts from `-u' to `-c', or
vice-versa, and is trivial to use.  Best would be that maintainers who
have a strong preference for one format over the other use this program,
and just leave users alone about their own preferences over this detail.

I do not remember if `unify' is part of the old stable `wdiff', but it is
likely part of the latest pretest, at:

   http://www.iro.umontreal.ca/contrib/wdiff/wdiff-0.5g.tar.gz

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list