Skip to content

Commit

Permalink
👷 misc(CI): ignore deleted files in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Nov 16, 2024
1 parent 557ea77 commit f93def0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f93def0

Please sign in to comment.