X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/874f78e7f17a15da00e4aad0c9bc14620330dded..fc1a358d5403e87bfdeca2d0c510362576a8c2e4:/git/hooks/coding-standards.sh diff --git a/git/hooks/coding-standards.sh b/git/hooks/coding-standards.sh index bc75a58..d4e4c71 100755 --- a/git/hooks/coding-standards.sh +++ b/git/hooks/coding-standards.sh @@ -13,6 +13,20 @@ $oldrev = ARGV[1] $newrev = ARGV[2] $user = ENV['USER'] +def blacklist bl + all_revs = `git rev-list #{$oldrev}..#{$newrev}`.split("\n") + all_revs.each do |rev| + bl.each do |b| + if rev == b + puts "Revision #{b} is blacklisted, you must remove it from your branch (possibly using git rebase) before you can push." + exit 1 + end + end + end +end + +blacklist ['26d74dc0524c87c5dcc0c76040ce413a4848b57a'] + # Only enforce policy on the master branch exit 0 if $refname != 'refs/heads/master' @@ -24,7 +38,7 @@ $broken_commit_message = /Please enter a commit message to explain why this merg $wrong_way_merge_master = /Merge( remote-tracking)? branch '([^\/]+\/)?master' into/ $merge_master = /Merge branch '[^']+'((?! into)| into master)/ $pull_merge = /Merge branch 'master' of / -$refs_or_closes_or_no_issue = /(refs #|closes #|no issue #)/i +$refs_or_closes_or_no_issue = /(refs #|closes #|fixes #|no issue #)/i # enforced custom commit message format def check_message_format