#!/bin/sh
set -eu

repository_root=$(git rev-parse --show-toplevel)
cd "$repository_root"

if ! command -v uv >/dev/null 2>&1; then
    echo "The commit policy requires uv; install it and run 'make install'." >&2
    exit 1
fi

exec uv run --no-sync python scripts/check_commits.py edit "$1"
