[TOOLS] Fix pre commit hook to allow for partial file commits (git add -p/git reset -p)

This commit is contained in:
Hugo Sales 2021-07-26 15:45:37 +00:00
parent a5348f2427
commit 4ec9b910c2
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
root="$(git rev-parse --show-toplevel)"
# get the list of changed files
staged_files="$(git diff --cached --name-only)"
staged_files="$(git status --porcelain | sed -rn "s/^[^ ][ ] (.*)/\1/p")"
echo "Running php-cs-fixer on edited files"