Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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