#!/bin/sh
# Refuse commits (and, via pre-merge-commit, merge commits) while main is checked out.
if [ "$(git symbolic-ref --short -q HEAD)" = "main" ]; then
  echo "$(basename "$0"): committing on main is not allowed; create a branch first." >&2
  exit 1
fi
exit 0
