blob: 68169f0126c51e3ae6feda694b7fac7e2e849877 [file] [log] [blame]
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2023,2026 Krzysztof Kozlowski <krzk@kernel.org>
#
# Installation:
# 1. Copy to .git/hooks/post-commit and .git/hooks/post-applypatch
# 2. Adjust paths and LINUS_MASTER_REF
#
TOOLS_DIR="__REPLACE__TOOLS__"
LINUS_MASTER_REF="linus/master"
echo -n "[Checking commit] "
git --no-pager log --format="%C(auto) %h %s" -n1
echo "[Checkpatch] "
git show --format=email HEAD | ./scripts/checkpatch.pl --strict --quiet
test $? -eq 0 && echo "OK"
echo
echo "[Signed-off-by] "
${TOOLS_DIR}verify_signedoff.sh HEAD^..HEAD
test $? -eq 0 && echo "OK"
echo
echo "[Fixes] "
${TOOLS_DIR}verify_fixes.sh "$LINUS_MASTER_REF" HEAD^..HEAD
test $? -eq 0 && echo "OK"
echo
exit 0