[Libreoffice-commits] .: git-hooks/commit-msg

Miklos Vajna vmiklos at kemper.freedesktop.org
Sat Mar 24 10:04:19 PDT 2012


 git-hooks/commit-msg |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 81dbafd1227fbd976e343c1ce880b4020112808a
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Sat Mar 24 18:01:34 2012 +0100

    git-hooks: commit-msg should not search for whitespace in the diff itself
    
    The additional sed removes every line after seeing the first line
    starting with a #, just like git will do it later as well.
    
    See: http://article.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/26794

diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg
index 378acfa..f2bcb3f 100755
--- a/git-hooks/commit-msg
+++ b/git-hooks/commit-msg
@@ -57,7 +57,7 @@ fi
 
 # Check for whitespace in front of *'s
 
-if [ -n "`grep '^[[:space:]]\+\*.*:' $1`" -a -z "`grep '^\*' $1`" ] ; then
+if [ -n "`sed '/^#/,$d' $1 | grep '^[[:space:]]\+\*.*:'`" -a -z "`grep '^\*' $1`" ] ; then
     abort "$1" "Please don't use whitespace in front of '* file: Description.' entries."
 fi
 


More information about the Libreoffice-commits mailing list