From a36cc40014930eb1a13a36cbd33157a4062a30a3 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Feb 2025 16:33:36 +0000 Subject: [PATCH] build: Update pre-push hook to improve test file checks - Changed the diff filter to exclude deleted files - Ensured only new or modified test files are checked --- .githooks/pre-push | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.githooks/pre-push b/.githooks/pre-push index a9d9420..a6b6dcd 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -14,8 +14,8 @@ if echo "$BRANCH_NAME" | grep -q '^(rebase)|(production)*$'; then fi # Check for existence of "new or modified" test files -TEST_FILES="$(git diff --diff-filter=ACDM --name-only --cached | grep -E '(./test/*)$')" -RUBY_FILES="$(git diff --diff-filter=ACDM --name-only --cached | grep -E '(_test\.rb)$')" +TEST_FILES="$(git diff --diff-filter=d --name-only --cached | grep -E '(./test/*)$')" +RUBY_FILES="$(git diff --diff-filter=d --name-only --cached | grep -E '(_test\.rb)$')" WORK_DONE=0