MAINTAINERS: Add Maximilian Brune to RISC-V
[coreboot.git] / util / gitconfig / pre-commit
blob8b571a72df7bd2218753898ff903d46f9aed0666
1 #!/usr/bin/env sh
2 ##
3 ## SPDX-License-Identifier: GPL-2.0-only
5 set -e # -o errexit
6 set -u # -o nounset
8 %MAKE% check-style lint-stable
10 PATCHDIFF=$(git diff --cached --src-prefix=a/ --dst-prefix=b/)
11 if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then
12 echo
13 echo "Running checkpatch"
14 printf "%s\n" "$PATCHDIFF" | util/lint/lint-007-checkpatch diff \
15 || (echo "Please consider fixing these issues." ;sleep 5) ; true