From f93def0692146a15b63d19406ec1180b9e41ba3d Mon Sep 17 00:00:00 2001 From: welpo Date: Sat, 16 Nov 2024 19:01:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20misc(CI):=20ignore=20deleted=20f?= =?UTF-8?q?iles=20in=20pre-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .githooks/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index e5f27c494..a6116ed55 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -148,8 +148,8 @@ fi # Ensure JavaScript files are minified. # ################################################################## -# Get the newly added and modified files. -mapfile -t all_changed_files < <(git diff --cached --name-only) +# Get the newly added and modified files, but not deleted files. +mapfile -t all_changed_files < <(git diff --cached --name-only --diff-filter=d) script_name=$(basename "$0") # Loop through all newly added or modified files.