git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Whitespace options
@ 2009-04-02 19:18 Gerd Knops
  2009-04-03  2:15 ` Joshua Juran
  2009-04-03  2:39 ` Miles Bader
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Knops @ 2009-04-02 19:18 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Whitespace options
  2009-04-02 19:18 Whitespace options Gerd Knops
@ 2009-04-03  2:15 ` Joshua Juran
  2009-04-03  2:39 ` Miles Bader
  1 sibling, 0 replies; 3+ messages in thread
From: Joshua Juran @ 2009-04-03  2:15 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Whitespace options
  2009-04-02 19:18 Whitespace options Gerd Knops
  2009-04-03  2:15 ` Joshua Juran
@ 2009-04-03  2:39 ` Miles Bader
  1 sibling, 0 replies; 3+ messages in thread
From: Miles Bader @ 2009-04-03  2:39 UTC (permalink / raw)
  To: Gerd Knops; +Cc: git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-03  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 19:18 Whitespace options Gerd Knops
2009-04-03  2:15 ` Joshua Juran
2009-04-03  2:39 ` Miles Bader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).