aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-12-03 16:40:05 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-12-03 16:41:31 -0500
commit88cad5523e7cdac6826dd8581e27e22a65afda26 (patch)
tree3884446a4723c0c9b01f4b8f6a6b34df9df0e367 /git-tools/hooks
parent[ticket/10093] Use color in commit-msg hook warning/error messages. (diff)
downloadphpbb-88cad5523e7cdac6826dd8581e27e22a65afda26.tar.gz
phpbb-88cad5523e7cdac6826dd8581e27e22a65afda26.tar.bz2
phpbb-88cad5523e7cdac6826dd8581e27e22a65afda26.zip
[ticket/10093] Make commit-msg always not fatal by nuking all fatal logic.
PHPBB3-10093
Diffstat (limited to 'git-tools/hooks')
-rwxr-xr-xgit-tools/hooks/commit-msg21
1 files changed, 3 insertions, 18 deletions
diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg
index 959c4e3979..e5a4c5e60b 100755
--- a/git-tools/hooks/commit-msg
+++ b/git-tools/hooks/commit-msg
@@ -12,11 +12,6 @@
# ln -s ../../git-tools/hooks/commit-msg \\
# .git/hooks/commit-msg
#
-# You can configure whether invalid commit messages abort commits:
-#
-# git config phpbb.hooks.commit-msg.fatal true (abort, this is the default)
-# git config phpbb.hooks.commit-msg.fatal false (warn only, do not abort)
-#
# Warning/error messages use color by default if the output is a terminal
# ("output" here is normally standard error when you run git commit).
# To force or disable the use of color:
@@ -26,13 +21,6 @@
config_ns="phpbb.hooks.commit-msg";
-if [ "$(git config --bool $config_ns.fatal)" = "false" ]
-then
- fatal=0;
-else
- fatal=1;
-fi
-
debug_level=$(git config --int $config_ns.debug || echo 0);
# Error codes
@@ -59,12 +47,9 @@ debug()
quit()
{
- if [ $1 -gt 0 ] && [ $1 -ne $ERR_UNKNOWN ] && [ $fatal -eq 0 ]
- then
- exit 0;
- else
- exit $1;
- fi
+ # Now we always exit with success, since git will trash
+ # entered commit message if commit-msg hook exits with a failure.
+ exit 0
}
use_color()