bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integrating wdiff into diff


From: Denver Gingerich
Subject: Re: Integrating wdiff into diff
Date: Sat, 2 Jun 2007 20:31:18 -0400

On 6/2/07, Bruce Korb <address@hidden> wrote:
> It seems to me that it would be best to default to wdiff-style output
> only if a line is more than 80 characters long, for example, and have
> a command-line option to modify the default (ie.
> --wdiff-min-cols=120).  This would cause diff to behave the same as it
> currently does with most source code because most source code has
> lines of no more than 80 characters.  Does this seem like reasonable
> behavior?

I'm not exactly sure where you come across your source code,
but most of it that I see goes past 80.  Often way, way, way past.

I suppose I should have done a more broad source code survey before
suggesting a default of 80.  The source code I was thinking of that
usually sticks to 80 columns is the Linux kernel.  But looking at
other projects (like OpenOffice.org for example) shows that this is
far from universal.

Few diff handling tools understand anything other than the basic formats.
So, no, it isn't a good default.  :(  It should be by request.

I see what you mean.  I hadn't considered all the diff handling tools
currently out there, which probably include a huge collection of
hacked together scripts that expect the output of diff to stay more or
less the same.

Ideally everyone would be using some sort of libdiff for parsing diffs
and we could just change libdiff to understand wdiff output along with
adding a wdiff parser to diff, which would prevent anyone's code from
breaking.  Practically, I suppose everyone parses diffs in their own
way so we can't change the default diff format.

Point taken; if I do the integration, I'll make sure the wdiff parser
is off by default with a command-line option to turn it on.

Denver




reply via email to

[Prev in Thread] Current Thread [Next in Thread]