mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 07:28:38 +08:00
checkpatch.sh: add check gerrit Change-ID support
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
parent
c4216d062f
commit
a48d81b9ad
1 changed files with 11 additions and 0 deletions
|
@ -90,7 +90,18 @@ check_patch() {
|
|||
fi
|
||||
}
|
||||
|
||||
check_msg() {
|
||||
while read; do
|
||||
if [[ $REPLY =~ ^Change-Id ]]; then
|
||||
echo "Remove Gerrit Change-ID's before submitting upstream"
|
||||
fail=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
check_commit() {
|
||||
msg=`git show -s --format=%B $1`
|
||||
check_msg <<< "$msg"
|
||||
diffs=`git diff $1`
|
||||
check_ranges <<< "$diffs"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue