#!/usr/bin/perl # vim:sts=4 sw=4 use strict; use warnings; use 5.024; for () { chomp; my ($old, $new, $ref) = split / /; for my $rev (qx{git log --format="%H" $new --not --all}) { chomp $rev; my $log = join '', qx{git show -s --format=%B $rev}; # Prevent commit messages formatted by phabricator to get in. if ($log =~ m|\n\nReviewers:[\t ]+|oms) { die "\n================================================================\n" . "Non-standard/badly formatted template - found 'Reviewers:' instead of 'Reviewed by:'.\n" . "================================================================\n" } if ($log =~ m|\n\nSubscribers:[\t ]+|oms) { die "\n================================================================\n" . "Non-standard/badly formatted template - found 'Subscribers:'.\n" . "================================================================\n" } } } exit 0;