aboutsummaryrefslogtreecommitdiffstats
path: root/git-tools
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-04-17 05:56:09 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-04-17 06:05:32 -0400
commit45b910f9b445dc50cf65e456d8fe6f3aae2cbc11 (patch)
treec458eb499f8209243477dbfbffd6f5ec7e2017dc /git-tools
parent1ce8a1d7ee1f361278358f5b2b3e15b449d2a8aa (diff)
downloadforums-45b910f9b445dc50cf65e456d8fe6f3aae2cbc11.tar
forums-45b910f9b445dc50cf65e456d8fe6f3aae2cbc11.tar.gz
forums-45b910f9b445dc50cf65e456d8fe6f3aae2cbc11.tar.bz2
forums-45b910f9b445dc50cf65e456d8fe6f3aae2cbc11.tar.xz
forums-45b910f9b445dc50cf65e456d8fe6f3aae2cbc11.zip
[ticket/10767] Use warning/error language as appropriate.
When commit-msg hook is fatal, label the message as an error. When it is not fatal, label the message as a warning. "Syntax error" is still always an error, not sure if this should be changed. PHPBB3-10767
Diffstat (limited to 'git-tools')
-rwxr-xr-xgit-tools/hooks/commit-msg4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg
index 4c9e56f555..fbeda805b7 100755
--- a/git-tools/hooks/commit-msg
+++ b/git-tools/hooks/commit-msg
@@ -31,8 +31,10 @@ config_ns="phpbb.hooks.commit-msg";
if [ "$(git config --bool $config_ns.fatal)" = "true" ]
then
fatal=1;
+ severity=Error;
else
fatal=0;
+ severity=Warning;
fi
debug_level=$(git config --int $config_ns.debug || echo 0);
@@ -187,7 +189,7 @@ do
# Don't be too strict.
# Commits may be temporary, intended to be squashed later.
# Just issue a warning here.
- complain "Warning: heading should be a sentence beginning with a capital letter." 1>&2
+ complain "$severity: heading should be a sentence beginning with a capital letter." 1>&2
complain "You entered:" 1>&2
complain "$line" 1>&2
fi