#!/bin/bash
# Deny attempts to push to github-master

function is_push_to_github()
{
	while read old_sha1 new_sha1 ref
	do
		if [[ $ref == "refs/heads/github-master" ]]
		then
			echo "ERROR: Pushing to github-master is not allowed via this repo!"
			return 1
		fi
	done
	return 0
}

is_push_to_github
exit $?
