aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-03-01 20:40:35 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-03-01 20:59:04 -0500
commitd7a38fd7ef2bea57107968014cf63652372b45c1 (patch)
tree50317748c9969fc18d5708eefc39e348884dceb6 /git-tools/hooks/commit-msg
parent[ticket/9824] Use printf instead of echo to render \n. (diff)
downloadphpbb-d7a38fd7ef2bea57107968014cf63652372b45c1.tar.gz
phpbb-d7a38fd7ef2bea57107968014cf63652372b45c1.tar.bz2
phpbb-d7a38fd7ef2bea57107968014cf63652372b45c1.zip
[ticket/9824] Allow empty lines after ticket reference.
PHPBB3-9824
Diffstat (limited to 'git-tools/hooks/commit-msg')
-rwxr-xr-xgit-tools/hooks/commit-msg9
1 files changed, 8 insertions, 1 deletions
diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg
index 1d33995162..319e27b811 100755
--- a/git-tools/hooks/commit-msg
+++ b/git-tools/hooks/commit-msg
@@ -139,6 +139,10 @@ do
# Should not end up here
false
;;
+ "possibly-eof")
+ # Allow empty and/or comment lines at the end
+ ! tail -n +"$i" "$1" |grep -qvE '^($|#)'
+ ;;
"comment")
echo "$line" | grep -Eq "^#";
;;
@@ -199,7 +203,7 @@ do
in_description=1;
;;
"footer")
- expecting="footer eof";
+ expecting="footer possibly-eof";
if [ "$tickets" = "" ]
then
tickets="$line";
@@ -210,6 +214,9 @@ do
"comment")
# Comments should expect the same thing again
;;
+ "possibly-eof")
+ expecting="eof";
+ ;;
*)
echo "Unrecognised token $expect" >&2;
quit 254;