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

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

Re: [PATCH] new option --ignore-trailing-space-change for diff


From: Hans-Bernhard Broeker
Subject: Re: [PATCH] new option --ignore-trailing-space-change for diff
Date: 1 Jul 2004 13:17:00 GMT

Roland McGrath <address@hidden> wrote:

> This patch adds --ignore-trailing-space-change, short option -z.  This is
> similar to -b, but ignores only trailing white space.  I find this is
> always what I want for making diffs of code. 

I would like to object to that reasoning, and instead state that
nobody ever actually wants or needs trailing white space in text
files, so it should be eradicated immediately as it's spotted.

Ignoring it in diff would be helpful only if it's intended to keep
that invisible white space in place, suggesting that keeping them is a
good general plan.  Which IMHO is the exact wrong reaction to finding
this kind of whitespace.

> Changes in trailing white space are uninteresting (and sometimes
> automatic, e.g. whitespace.el), while changes in leading or internal
> white space on a line are meaningful code formatting changes.

That would hide bugs with backslash-newline continuation in several
scripting and programming languages, in which trailing whitespace (as
in: absence of any) is vitally important.

I'll leave the discussion whether a formatting change is a "meaningful
code change" for another time.  Suffice it to say my usual diff switch
collection is -uwp.

-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.




reply via email to

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