tools/checkpatch.sh: fix check for HEAD commit

fix checkpath.sh usage for HEAD commit:

  ./tools/checkpatch.sh -c -u -m -g HEAD

regression after 93911d52a8

Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
raiden00pl 2025-09-02 20:27:44 +02:00 committed by Xiang Xiao
parent 5592dc75dc
commit 4b1b3c58a0

View file

@ -342,7 +342,7 @@ check_msg() {
check_commit() {
if [ $message != 0 ]; then
# check each commit format separately if this is a series of commits
if [[ $1 =~ HEAD ]]; then
if [[ $1 =~ ..HEAD ]]; then
for commit in $(git rev-list --no-merges $1); do
msg=`git show -s --format=%B $commit`
check_msg <<< "$msg"