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

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

Re: diffutils 2.8: newlines not ignored under -w


From: Robert A. (Bob) Morris
Subject: Re: diffutils 2.8: newlines not ignored under -w
Date: Fri, 5 Apr 2002 23:40:58 -0500

If the difference is solely a line with nothing but whitespace
containing /more/ than just a newline, diff -wB reports a difference,
as does Solaris diff.

I can't find /any/ combination of arguments that can ignore this difference.
If I'm right, it seems the documentation change still does not cover
the behavior (which is in any case bizarre).

Explictly, consider files foo1, foo2, foo3

foo1 contains five characters:  a\n{SP}b\n
foo2 contains five characters:  a\n\nb\n
foo3 contains four characters: a\nb\n

diff -wB or diff --ignore-all-space should report no diffs between any
of these files. However it distinguishes foo1 from the other two, but
does not distinguish foo2 from foo3

Bob



Paul Eggert writes:
 > Date: Fri, 5 Apr 2002 12:04:37 -0800 (PST)
 > From: Paul Eggert <address@hidden>
 > To: address@hidden
 > CC: address@hidden, address@hidden
 > Subject: Re: diffutils 2.8: newlines not ignored under -w
 > 
 > > From: address@hidden (Karl Berry)
 > > CC: address@hidden
 > > Date: Fri, 5 Apr 2002 13:06:45 -0500
 > > 
 > > In diffutils 2.8 (tried both solaris 2.7 and gnu/linux), diff -w does
 > > not ignore newlines, although the manual (node White Space) says it
 > > should:
 > 
 > Thanks, I think that's a bug in the manual.  The current behavior is
 > longstanding practice, and Solaris 8 /usr/bin/diff also does not
 > ignore newlines.  You can get some of the effect that you want with
 > -wB.
 > 
 > I'll install something like the following patch into the manual.
 > 
 > 
 > @@ -305,8 +298,8 @@
 >  @end example
 >  
 >  The @option{-w} and @option{--ignore-all-space} options are stronger still.
 > -They ignore difference even if one file has white space where
 > -the other file has none.  @dfn{White space} characters include
 > +They ignore difference even if one line has white space where
 > +the other line has none.  @dfn{White space} characters include
 >  tab, newline, vertical tab, form feed, carriage return, and space;
 >  some locales may define additional characters to be white space.
 >  With these options, @command{diff} considers the
 > 



reply via email to

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