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

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

Re: diff -b does not actually work with newlines


From: David Kastrup
Subject: Re: diff -b does not actually work with newlines
Date: Sun, 15 Jul 2007 19:38:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

"Denver Gingerich" <address@hidden> writes:

> On 7/13/07, David Kastrup <address@hidden> wrote:
>> Paul Eggert <address@hidden> writes:
>>
>> > diff -b is working as specified.  It sounds like you want wdiff; you
>> > might try using that instead.
>>
>> wdiff does not return suitable output or take suitable options.
>
> Can you provide some reasons why the wdiff output is not suitable
> for your purposes?

Because it is completely idiosyncratic and can't be fed into patch or
any other utility interpreting diffs?

Because it takes different options from diff and thus could not be
plugged into a version control system even if the above was not the
case?

> If the files are equal, disregarding whitespace, I'm not sure why
> you would even want to use the output.

Sigh.  If one compares two revisions of a file that has been through a
whitespace-wrapping editor, the files are _not_ equal disregarding
whitespace.  The whole point is to find out what _actual_ change
occured _outside_ of the whitespace changes, so that one can take that
diff and feed it into patch.  That way, one gets a version with all
the non-whitespace changes, without getting hundreds of whitespace
changes.

> Instead I think the return code would be more useful to you.

You really think you know better than myself what I need?

> wdiff correctly returns 0 with your test case, indicating the files
> are the same, excluding whitespace.
>
> Which options is wdiff lacking that would make it easier to use for
> your purposes?  We can always add them if they seem reasonable.

It just has a completely different option set from diff, and it has
completely different output.  It's just completely useless for
plugging into version control systems (systems like Subversion allow
to specify an external diff program to use.  Plugging in wdiff
immediately breaks because of unknown options).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum





reply via email to

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