diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/gitconfig/pre-commit | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit index 70cd6eade1..257f6964bb 100755 --- a/util/gitconfig/pre-commit +++ b/util/gitconfig/pre-commit @@ -1,3 +1,9 @@ #!/bin/sh %MAKE% lint-stable -git diff --cached | util/lint/checkpatch.pl --no-signoff -q - + +PATCHDIFF=$(git diff --cached) +if echo "$PATCHDIFF" | grep -q "@@"; then + echo + echo "Running checkpatch" + echo "$PATCHDIFF" | util/lint/checkpatch.pl --no-signoff -q - +fi |