Ralf Wildenhues wrote: > Jim Meyering writes: >> >> This is obviously incomplete (the FIXME, and no configuration >> recommendations for Emacs' Whitespace), but we have to start somewhere. >> As usual, suggestions welcome. > > Either of these: > chmod +x .git/hooks/pre-commit > git config apply.whitespace error-all > > The latter requires pretty recent git, and there are several settings that > may be useful. See the manpage for git-apply for details.
Good idea. Thanks! I'll push this tomorrow, unless you'd prefer something else. >From 9297e61833f2872125854815a6daf433e949ec64 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues <ralf.wildenh...@gmx.de> Date: Mon, 2 Mar 2009 22:33:05 +0100 Subject: [PATCH] * HACKING (Avoid trailing white space): Mention how git can help. --- HACKING | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/HACKING b/HACKING index 0675f9c..9b0c593 100644 --- a/HACKING +++ b/HACKING @@ -380,6 +380,17 @@ If you use vim, add this to ~/.vimrc: match RedundantSpaces /\s\+$\| \+\ze\t/ +Git can help too, by stopping you from committing any change that would +add trailing blanks. Depending on the version of git you're using, run +one of these commands to enable the check: + + chmod +x .git/hooks/pre-commit + git config apply.whitespace error-all + +The latter requires pretty recent git, and there are several settings that +may be useful. See the manpage for git-apply for details. + + ------------------------------------------- Miscellaneous useful git commands -- 1.6.2.rc1.285.gc5f54 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils