From 2a36d6a5614f994d3236a203ea2ac112440186ae Mon Sep 17 00:00:00 2001 From: Hodlinator <172445034+hodlinator@users.noreply.github.com> Date: Wed, 17 Jun 2026 14:52:08 +0200 Subject: [PATCH] lint: Require scripted-diff script to succeed Previous version of commit-script-check.sh would succeed as long as git diff succeeded. Can be verified through adding a failing scripted diff commit such as: git commit --allow-empty -m $'scripted-diff: foo\n\n-BEGIN VERIFY SCRIPT-\nadsasd\n-END VERIFY SCRIPT-\n' ...and running... cargo run --manifest-path ./test/lint/test_runner/Cargo.toml -- --lint=scripted_diff --- test/lint/commit-script-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lint/commit-script-check.sh b/test/lint/commit-script-check.sh index af7a0d2f535..94b0708faa9 100755 --- a/test/lint/commit-script-check.sh +++ b/test/lint/commit-script-check.sh @@ -41,7 +41,7 @@ for commit in $(git rev-list --reverse "$1"); do else echo "Running script for: $commit" >&2 echo "$SCRIPT" >&2 - (eval "$SCRIPT") + (eval "$SCRIPT") && \ git --no-pager diff --exit-code "$commit" && echo "OK" >&2 || (echo "Failed" >&2; false) || RET=1 fi git reset --quiet --hard HEAD