diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 0b949b472a2175ef77faca4fde22e298f06db3a6..a390be22224fa465e3fa9cf5f4e2514a9759f060 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -40,6 +40,7 @@ if (defined $config{flags}) { } my $fail = 0; my $printed = $gerrit; +my $complained = 0; our $file = ""; # 'our' for usage of 'local' my $fail_file = "-"; my $summary; @@ -63,6 +64,7 @@ sub complain() print "***\n*** Suspicious changes in commit ".$sha1." (".$summary."):\n"; $printed = 1; } + $complained = 1; if (length($file)) { if ($file ne $fail_file) { print $elpfx.$lpfx.$file.":\n"; @@ -574,4 +576,8 @@ if (%footnotes) { } } +if ($complained) { + print $elpfx.$lpfx."See http://qt-project.org/wiki/Early-Warning-System for explanations.\n"; +} + exit ($gerrit ? (!$fail ? 11 : (10 - $fail)) : $fail)