-
-
Save jonny64/23b807f29c37c5699670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
my ($branch, $before_sha, $after_sha) = @ARGV; | |
warn "updating ref $branch"; | |
if ($branch ne 'refs/heads/master') { | |
exit 0; | |
} | |
my $testing_merges=`git log --pretty=%s $before_sha..$after_sha | grep "testing" | wc -l`; | |
chop $testing_merges; | |
if (0 + $testing_merges > 0) { | |
warn "error: possible merge of testing branch into master, do not use 'testing' in commit message"; | |
warn " $testing_merges"; | |
exit 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment