mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
🐛 misc(pre-commit hook): handle filenames with spaces
This commit is contained in:
parent
faa9633531
commit
448250ff57
1 changed files with 2 additions and 2 deletions
|
@ -149,11 +149,11 @@ fi
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# Get the newly added and modified files.
|
# Get the newly added and modified files.
|
||||||
all_changed_files=$(git diff --cached --name-only --diff-filter=AM)
|
mapfile -t all_changed_files < <(git diff --cached --name-only)
|
||||||
|
|
||||||
script_name=$(basename "$0")
|
script_name=$(basename "$0")
|
||||||
# Loop through all newly added or modified files.
|
# Loop through all newly added or modified files.
|
||||||
for file in $all_changed_files; do
|
for file in "${all_changed_files[@]}"; do
|
||||||
file_name=$(basename "$file")
|
file_name=$(basename "$file")
|
||||||
|
|
||||||
# Ignore this script and the changelog.
|
# Ignore this script and the changelog.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue