Re: git and trailing whitespace



On Wed, 2009-05-06 at 11:18 +0200, Loïc Minier wrote:
> On Wed, May 06, 2009, Lennart Poettering wrote:
> > I just have these lines in my ~/.emacs:
> > (autoload 'nuke-trailing-whitespace "nuke-trailing-whitespace" nil t)
> > (add-hook 'write-file-hooks 'nuke-trailing-whitespace)
> 
>  This sounds like it would remove all trailing whitespace in any file
>  you touch; that sounds like a pretty bad idea for thinks like "blame"
>  and will probably generate huge diffs for small changes -- or is this
>  only about new code you're writing?
> 
>  I use vim and it displays trailing whitespaces as blue dots for me:
>   set list
>   set listchars=tab:>-,trail:.,extends:>,precedes:<,nbsp:%
>  (the relevant config above is "trail:."; I find the other ones useful
>  as well)

Eek. That'd look bad. I believe this line is from Xavier's vimrc:
set listchars=eol:•,tab:↦\ ,trail:»,extends:↷,precedes:↶

>  The blue dots are not intrusive when I'm actually typing text or
>  reading code with trailing whitespace, yet allow me to see the issue
>  and fix it.
> 
> > And then I don't have to think about anything. Except that it breaks
> > my patches for other peoples' project which don't care about trailing
> > whitespace.
> 
>  These people could use "patch -l" to apply your patches, but then I
>  think you shouldn't be stripping all trailing whitespace gratuitously.
> 



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