summaryrefslogtreecommitdiff
path: root/util/gitconfig/pre-commit
blob: 1c04bc34e94892a15790a664b3c002e3e94f4f8d (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
%MAKE% lint-stable

PATCHDIFF=$(git diff --cached)
if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then
	echo
	echo "Running checkpatch"
	printf "%s\n" "$PATCHDIFF" | util/lint/checkpatch.pl --no-signoff -q -
fi