aboutsummaryrefslogtreecommitdiffstats
path: root/git-tools/hooks/commit-msg
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-03-14 13:58:57 +0100
committerAndreas Fischer <bantu@phpbb.com>2011-03-14 13:58:57 +0100
commit7588b4352638a3bb7fa0cff7ef9d78c8668d0905 (patch)
treecce5f5e727e7a727cd29300017b3ffeeee6a6152 /git-tools/hooks/commit-msg
parent089e3a9ff4cced1570a21d40c3cca215642ccfe5 (diff)
parentc75b299eb160fd330476ea91d5236558a3a59ed7 (diff)
downloadforums-7588b4352638a3bb7fa0cff7ef9d78c8668d0905.tar
forums-7588b4352638a3bb7fa0cff7ef9d78c8668d0905.tar.gz
forums-7588b4352638a3bb7fa0cff7ef9d78c8668d0905.tar.bz2
forums-7588b4352638a3bb7fa0cff7ef9d78c8668d0905.tar.xz
forums-7588b4352638a3bb7fa0cff7ef9d78c8668d0905.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10096] Fixed whitespace in functions.php. [ticket/10078] Avoid \n in strings given to echo for portability. [ticket/10092] Ignore overlength comment lines in commit-msg hook.
Diffstat (limited to 'git-tools/hooks/commit-msg')
-rwxr-xr-xgit-tools/hooks/commit-msg7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg
index ad4d69a9da..4f6ae71d4b 100755
--- a/git-tools/hooks/commit-msg
+++ b/git-tools/hooks/commit-msg
@@ -66,12 +66,13 @@ then
exit 0
fi
-msg=$(grep -nE '.{81,}' "$1");
+msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')
if [ $? -eq 0 ]
then
- echo "The following lines are greater than 80 characters long:\n" >&2;
- echo $msg >&2;
+ echo "The following lines are greater than 80 characters long:" >&2;
+ echo >&2
+ echo "$msg" >&2;
quit $ERR_LENGTH;
fi