mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 21:10:31 +02:00
[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
This commit is contained in:
@@ -31,8 +31,10 @@ config_ns="phpbb.hooks.commit-msg";
|
|||||||
if [ "$(git config --bool $config_ns.fatal)" = "true" ]
|
if [ "$(git config --bool $config_ns.fatal)" = "true" ]
|
||||||
then
|
then
|
||||||
fatal=1;
|
fatal=1;
|
||||||
|
severity=Error;
|
||||||
else
|
else
|
||||||
fatal=0;
|
fatal=0;
|
||||||
|
severity=Warning;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
debug_level=$(git config --int $config_ns.debug || echo 0);
|
debug_level=$(git config --int $config_ns.debug || echo 0);
|
||||||
@@ -187,7 +189,7 @@ do
|
|||||||
# Don't be too strict.
|
# Don't be too strict.
|
||||||
# Commits may be temporary, intended to be squashed later.
|
# Commits may be temporary, intended to be squashed later.
|
||||||
# Just issue a warning here.
|
# 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 "You entered:" 1>&2
|
||||||
complain "$line" 1>&2
|
complain "$line" 1>&2
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user