#!/bin/bash
# Deny attempts to push to github owned branches

function is_push_to_github()
{
	while read old_sha1 new_sha1 ref
	do
		case "$ref" in
			refs/heads/github-*)
			echo "ERROR: Pushing to github owned branches is not allowed!"
			return 1
			;;
		esac
	done
	return 0
}

is_push_to_github
exit $?
