Merge pull request #66 from ViPro-Technologies/chore/pre-push-clean-working-tree
chore: require clean working tree in pre-push hookpull/67/head^2
commit
d6d6c81bb1
|
|
@ -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=""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue