
29 Aug
2013
29 Aug
'13
8:07 a.m.
Hi,
On Thu, Aug 29, 2013 at 12:52 PM, Jan Stolarek
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