Merge pull request #66 from ViPro-Technologies/chore/pre-push-clean-working-tree

chore: require clean working tree in pre-push hook
pull/67/head^2
VinPropane 2026-05-04 20:32:20 -04:00 committed by GitHub
commit d6d6c81bb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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=""