bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] * HACKING: avoid trailing white space


From: Jim Meyering
Subject: Re: [PATCH] * HACKING: avoid trailing white space
Date: Mon, 02 Mar 2009 22:34:41 +0100

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 <address@hidden>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]