Created
February 17, 2012 12:48
-
-
Save eval/1853235 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/env ruby | |
$VERBOSE=true | |
UNACCEPTABLE_REFNAME = /refs\/heads\/\d/ | |
refname, oldrev, newrev = ARGV[0...3] | |
if oldrev[/^0{40}/] # new branch received | |
if refname[UNACCEPTABLE_REFNAME] | |
raise "Names of branches can't be of the form '#{UNACCEPTABLE_REFNAME}'" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment