[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
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

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"