[Cmake-commits] CMake branch, hooks, updated. 6c7e3f42ba6eb3e415a93b4e6d0494d66474b213

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jun 16 15:55:24 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, hooks has been updated
       via  6c7e3f42ba6eb3e415a93b4e6d0494d66474b213 (commit)
      from  1387c7efa00ce996107885e8d806faf50648e04a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c7e3f42ba6eb3e415a93b4e6d0494d66474b213
commit 6c7e3f42ba6eb3e415a93b4e6d0494d66474b213
Author: Brad King <brad.king at kitware.com>
Date:   Wed Jun 16 15:53:39 2010 -0400

    commit-msg: Reject leading or trailing space on first line

diff --git a/commit-msg b/commit-msg
index 3953b37..e3b51de 100755
--- a/commit-msg
+++ b/commit-msg
@@ -39,6 +39,10 @@ msg_first() {
 '"$line"'
 ------------------------------------------------------------------------------
 '
+	elif echo "$line" | grep "^[	 ]\|[	 ]$" >/dev/null 2>&1; then
+		die 'The first line may not have leading or trailing space:
+['"$line"']
+'
 	else
 		# first line okay
 		state=second
@@ -61,7 +65,7 @@ msg_rest() {
 # Pipe commit message into the state machine.
 state=first
 cat "$commit_msg" |
-while read line; do
+while IFS='' read line; do
 	msg_$state || break
 done &&
 rm -f "$commit_msg"

-----------------------------------------------------------------------

Summary of changes:
 commit-msg |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list