[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1182968229.8970.124.camel@josh-work.beaverton.ibm.com>
Date: Wed, 27 Jun 2007 11:17:09 -0700
From: Josh Triplett <josht@...ux.vnet.ibm.com>
To: Chris Shoemaker <c.shoemaker@....net>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
josh@...nel.org
Subject: Re: [PATCH] CodingStyle: Add information about trailing whitespace.
On Wed, 2007-06-27 at 14:05 -0400, Chris Shoemaker wrote:
> On Wed, Jun 27, 2007 at 10:59:20AM -0700, Josh Triplett wrote:
> > +Do not leave trailing whitespace at the ends of lines. Some editors with
> > +"smart" indentation will insert whitespace at the beginning of new lines as
> > +appropriate, so you can start typing the next line of code right away.
> > +However, some such editors do not remove the whitespace if you end up not
> > +putting a line of code there, such as if you leave a blank line. As a result,
> > +you end up with lines containing trailing whitespace.
> > +
> > +Git will warn you about patches that introduce trailing whitespace, and can
> > +optionally strip the trailing whitespace for you; however, if applying a series
> > +of patches, this may make later patches in the series fail by changing their
> > +context lines.
>
> What I'd really like to see is, _why_ is trailing whitespace
> considered harmful? Something about MUAs not preserving it or
> something?
When the trailing whitespace later disappears, that change shows up in
diffs, and since you can't see the whitespace difference, it just looks
like a mysterious change until you check it more closely. It also
introduces gratuitous conflicts and other such annoyances.
- Josh Triplett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists