summaryrefslogtreecommitdiffstats
path: root/git-hooks
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-02-17 14:10:56 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-06-12 10:17:24 +0000
commit6e9bf2c01ed61840fde531a6d8d01a8493a0d151 (patch)
treee4762226aba73ae259f0bfca0c9981d87b0c963b /git-hooks
parent2792c18e1d33594da05914d9d521adc2cc641ad9 (diff)
separate fixup check from w-i-p check
it doesn't really make sense to claim wip for a neglected squash. Change-Id: I30245ff57142bebbdd2e29ff4160ccb7c427392e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/gerrit-bot-extras5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-hooks/gerrit-bot-extras b/git-hooks/gerrit-bot-extras
index fad85da..32e38c4 100755
--- a/git-hooks/gerrit-bot-extras
+++ b/git-hooks/gerrit-bot-extras
@@ -96,9 +96,12 @@ if (!defined($subject)) {
}
my $cr = 0;
-if ($subject =~ /^[<[]?[Ww]ip\b|\bWIP\b|\*{3}|^(?:squash|fixup)! |^(.)\1*$/) {
+if ($subject =~ /^[<[]?[Ww]ip\b|\bWIP\b|\*{3}|^(.)\1*$/) {
unshift @messages, "Apparently pushing a Work In Progress";
$cr = -2;
+} elsif ($subject =~ /^(?:squash|fixup)! /) {
+ unshift @messages, "Commit was meant to be squashed";
+ $cr = -2;
}
$verdict{labels}{'Code-Review'} = $cr;