If there are problems and fatal is true, print that the commit
is aborted.
If there are problems and fatal is false, print instructions
for fixing the commit.
PHPBB3-10767
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
Revert "[ticket/10093] Make commit-msg always not fatal by nuking all fatal logic."
This reverts commit 88cad5523e7cdac6826dd8581e27e22a65afda26.
PHPBB3-10093
PHPBB3-10767
Some commit messages exist only temporarily, because they are given
on commits that are intended to be squashed. Accept such commit
messages with a warning.
PHPBB3-9824
Git already handles the case of commit message being empty by
aborting the commit and displaying a reasonably helpful message.
If there is no commit message, the hook will exit with success
exit code to let git do its thing.
PHPBB3-9824
Changed to awk which handles the formatting differences between the
two versions of wc -- BSD version prefixes the output with spaces,
the GNU version does not.
PHPBB3-9808
This updated hook supports validates each line of the commit message
confirms to the phpBB standards [1], there are two git config options
which adjust the behaviour of the hook. They are:
* phpbb.hooks.commit-msg.fatal: Set to false for the hook to allow
commits with malformed structure, useful if you'll be squashing
or editing the commits later. True is the default value.
* phpbb.hooks.commit-msg.debug: Any integer value greater than 0 will
increase the debugging verbosity of the hook, the default value is 0.
[1] http://wiki.phpbb.com/display/DEV/Git
PHPBB3-9768