[TOOLS] Fix pre commit hook to allow for partial file commits (git add -p/git reset -p)
This commit is contained in:
parent
a5348f2427
commit
4ec9b910c2
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user