chore: require clean working tree in pre-push hook

pull/66/head
VinPropane 2026-05-04 20:30:04 -04:00
parent a5f7f1b4ae
commit 1070cf88fd
1 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,13 @@ set -euo pipefail
repo_root="$(git rev-parse --show-toplevel)"
cd "$repo_root"
echo "pre-push: checking for a clean working tree"
if [[ -n "$(git status --porcelain)" ]]; then
echo "pre-push: refuse to push — working tree is not clean. Commit, stash, or remove changes first:" >&2
git status --short >&2
exit 1
fi
gdlint_bin=""
gdformat_bin=""