[Top][All Lists]

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

Integrating wdiff into diff

From: Denver Gingerich
Subject: Integrating wdiff into diff
Date: Sat, 2 Jun 2007 18:14:41 -0400

I am interested in integrating wdiff into the diff tools, but before I
start work on this, it would be good to know whether some work has
already been done.  It looks like Paul Eggert was planning on working
on this (http://lists.gnu.org/archive/html/bug-gnu-utils/2001-06/msg00076.html),
but it doesn't look like diff has any of wdiff's functionality yet.
Has anyone started on integrating wdiff into diff?  If not, is there a
good reason why people have chosen not to work on it (ie. everyone
uses graphical diff tools these days, few people diff files with long
lines, etc.)?

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

As far as I can tell, the current version of wdiff is a bit limited in
that you either get the whole line as context or only the differences
between lines with no context (using the --no-common parameter).  I'd
like to fix that so one can have a few words of context around the
changed words (please correct me if there is already a way of doing

Any suggestions on how the wdiff-style output should be formatted
would be appreciated.  There would need to be at least a few changes
to wdiff's current output style to make it work properly as input to a
modified patch program.  Right now it seems that with the --no-common
parameter, it is in general impossible to determine where in the line
the change was made given the output of wdiff.  A column number should
be present somewhere in the output specifying where the change is.


reply via email to

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