We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 851f2f6 commit f2ac4e9Copy full SHA for f2ac4e9
hooks/pre-commit
@@ -37,7 +37,7 @@ then
37
IFS=$'\n'
38
39
echo "Files formatted:"
40
- files=$(git diff --diff-filter=AM --name-only | grep -E ".hpp$|.cpp$" | grep -v "^lib/")
+ files=$(git diff --cached --diff-filter=AM --name-only | grep -E ".hpp$|.cpp$" | grep -v "^lib/")
41
42
# format the files
43
echo $files | xargs -n20 -P6 clang-format -i
0 commit comments