# Whitespace options

3 messages from 2009-04-02 to 2009-04-03. Participants: Gerd Knops, Joshua Juran, Miles Bader.
Thread: https://gitlist.dev/t/18697

## Gerd Knops, 2009-04-02 19:18

Subject: Whitespace options
Message-ID: <3C72F4A7-9B7A-44D0-B13D-FD534EB02C27@bitart.com>
URL: https://gitlist.dev/e/3C72F4A7-9B7A-44D0-B13D-FD534EB02C27%40bitart.com

```
Hi all,

I think there should be a whitespace option that ignores lines that  
consists completely of whitespace vs lines with actual trailing  
whitespace preceded by non-whitespace.

The reason is that many editors (especially those supporting indent- 
based code folding) keep 'empty' lines at the current indentation  
level. git (with default settings) flags all those lines.

I know I could just remove 'trailing-space' from 'core.whitespace',  
but I would actually still like be notified about the case where a  
line that is not whitespace only ends with trailing whitespace.

Thanks

Gerd

```

## Joshua Juran, 2009-04-03 02:15

Subject: Re: Whitespace options
Message-ID: <612E4BF7-3230-462A-8A82-1E268F9A7632@gmail.com>
URL: https://gitlist.dev/e/612E4BF7-3230-462A-8A82-1E268F9A7632%40gmail.com
In-Reply-To: <3C72F4A7-9B7A-44D0-B13D-FD534EB02C27@bitart.com>

```
On Apr 2, 2009, at 12:18 PM, Gerd Knops wrote:

> I think there should be a whitespace option that ignores lines that  
> consists completely of whitespace vs lines with actual trailing  
> whitespace preceded by non-whitespace.

+1

> The reason is that many editors (especially those supporting indent- 
> based code folding) keep 'empty' lines at the current indentation  
> level.

As do some users, out of personal preference.

Josh

```

## Miles Bader, 2009-04-03 02:39

Subject: Re: Whitespace options
Message-ID: <buoab6yjw9m.fsf@dhlpc061.dev.necel.com>
URL: https://gitlist.dev/e/buoab6yjw9m.fsf%40dhlpc061.dev.necel.com
In-Reply-To: <3C72F4A7-9B7A-44D0-B13D-FD534EB02C27@bitart.com>

```
Gerd Knops <gerti-git@bitart.com> writes:
> The reason is that many editors (especially those supporting indent-
> based code folding) keep 'empty' lines at the current indentation
> level. git (with default settings) flags all those lines.

That sounds like very fragile behavior on the part of the editor -- it
sounds like they assume that all source code was created by their
editor, and will never be touched by any other tool...

-Miles

-- 
Suburbia: where they tear out the trees and then name streets after them.

```
