From fcce4de6fcbbcd1da8ecef925702c2c480454df0 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 16 Jun 2026 13:25:45 +0200 Subject: [PATCH] Allow running check_script.sh when there are uncommitted changes --- scripts/check_commit.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/check_commit.sh b/scripts/check_commit.sh index 9cc5e5c7b..37557462e 100755 --- a/scripts/check_commit.sh +++ b/scripts/check_commit.sh @@ -5,15 +5,13 @@ set -e -git diff --quiet || { - echo "Error: there are unstaged changes. Please stage or stash them before running this script." - exit 1 -} - just test just lint + +status_before_generate=$(git status --porcelain=v1) just generate -git diff --quiet || { +status_after_generate=$(git status --porcelain=v1) +if [[ "$status_after_generate" != "$status_before_generate" ]]; then echo "Error: auto-generated files not up to date." exit 1 -} +fi