7 DATA_DIR = '/srv/git/hooks/server/'
10 $stdout.puts "---------------------------------------------------------"
11 $stdout.puts "Commit #{NEWREV} rejected:"
12 $stdout.puts "\t#{message}"
13 $stdout.puts "---------------------------------------------------------"
18 locked = `git config hooks.update-lock-check.locked`.split(' ').collect { |element| element.strip() }
19 preserved = `git config hooks.update-lock-check.preserved`.split(' ').collect { |element| element.strip() }
21 if(REFNAME =~ /^refs\/heads\/(.+)$/)
24 if(locked.include?(commit_branch))
25 reject("Branch #{commit_branch} is locked.")
28 if(NEWREV =~ /^0{40}$/)
30 if(preserved.include?(commit_branch))
31 reject("Branch #{commit_branch} cannot be deleted.")