Disallow pushing of new trailing whitespace

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Thu Aug 29 14:07:44 CEST 2013


On Thu, Aug 29, 2013 at 12:52 PM, Jan Stolarek <jan.stolarek at p.lodz.pl> wrote:
>> The problem with these kind of commit-time checks is that you only find
>> out the problem *after* you've validated your nicely polished commits.
> This is easily solved by adding this line to .emacs file:
> (add-hook 'before-save-hook 'delete-trailing-whitespace)
> No more trailing whitespaces. Ever.

The problem with this approach is that if a file already contains
trailing whitespace, you'll introduce spurious changes in your commit.
This can make patches quite hard to review. One solution is to use
ethan-wspace [1].

[1] https://github.com/glasserc/ethan-wspace

More information about the ghc-devs mailing list