blob: 104908fa5c91e63127f7524cfa2144dbef9618a9 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 | #!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, make this file executable.
# This is slightly modified from Andrew Morton's Perfect Patch.
# Lines you introduce should not have trailing whitespace.
# Also check for an indentation that has SP before a TAB.
if git-rev-parse --verify HEAD 2>/dev/null
then
	git-diff-index -p -M --cached HEAD
else
	# NEEDSWORK: we should produce a diff with an empty tree here
	# if we want to do the same verification for the initial import.
	:
fi | scripts/checkpatch.pl --no-signoff --strict -
 |