From ea22f22eff4c167eed594e2923c98ec80c86ed1a Mon Sep 17 00:00:00 2001 From: Joseph Farrell Date: Thu, 4 Dec 2025 00:56:02 -0800 Subject: [PATCH] update pre-push to check for uncommitted changes --- src/etc/pre-push.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh index 33ed2f0e406b1..eeb37ca22e60c 100755 --- a/src/etc/pre-push.sh +++ b/src/etc/pre-push.sh @@ -21,6 +21,12 @@ if $SKIP; then exit 0 fi +if ! git diff --quiet || ! git diff --cached --quiet; then + echo "error: Uncommitted changes detected." + echo "Please commit or stash your changes before pushing." + exit 1 +fi + ROOT_DIR="$(git rev-parse --show-toplevel)" echo "Running pre-push script $ROOT_DIR/x test tidy"