mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
6a150dfa3f
PD#SWPL-217731 Problem: merge_check.pl dose not work. Solution: 1, exec merge_check.pl in pre-commit 2, add arm32 defconfig scan Verify: localhost Change-Id: I955b29e0166421d52cf9b93fd5256d621172ef17 Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
31 lines
816 B
Bash
Executable File
31 lines
816 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
#
|
|
# pre-commit hook to run check-patch on the output and stop any commits
|
|
# that do not pass. Note, only for git-commit, and not for any of the
|
|
# other scenarios
|
|
#
|
|
# Copyright 2010 Ben Dooks, <ben-linux@fluff.org>
|
|
|
|
if git rev-parse --verify HEAD 2>/dev/null >/dev/null
|
|
then
|
|
against=HEAD
|
|
else
|
|
# Initial commit: diff against an empty tree object
|
|
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
fi
|
|
|
|
git diff --cached --stat -p $against -- | ./scripts/checkpatch.pl --ignore GERRIT_CHANGE_ID,COMMIT_MESSAGE --strict --no-signoff -
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit 1;
|
|
fi
|
|
|
|
git diff --name-status --cached $against -- | ./scripts/amlogic/licence_pre.pl -
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit 1;
|
|
fi
|
|
|
|
git diff --name-status --cached $against -- | ./scripts/amlogic/merge_check.pl -
|