#!/usr/bin/env sh

while read -r local_ref local_oid remote_ref remote_oid
do
  if [ "$remote_ref" = "refs/heads/main" ]; then
    echo "Direct pushes to main are disabled in this repository."
    echo "Push a feature branch and open a pull request instead."
    exit 1
  fi
done
