We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a0f054 commit 2381706Copy full SHA for 2381706
hooks/pre-commit
@@ -4,15 +4,7 @@ if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
4
exec < /dev/tty
5
fi
6
7
-$(pwd)/vendor/bin/pint $@
8
-# Get the list of files that were modified by Pint
9
-modified_files=$(git diff --name-only --cached)
10
-echo $modified_files
11
-# Add the modified files back to the staging area
12
-if [ -n "$modified_files" ]; then
13
- echo "Adding fixed files to the commit..."
14
- git add $modified_files
15
-fi
16
-
17
+files=$(git diff --cached --name-only --diff-filter=ACM -- '*.php');
+$(pwd)/vendor/bin/pint $files -q
18
+git add $files
0 commit comments