utils: hooks: pre-push: Reject commits with a Change-Id

We're not using gerrit, so let's prevent Change-Id tags creeping in
unadvertently.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2020-10-30 03:35:32 +02:00
parent 58d487b10e
commit 4757ff4ab7

View file

@ -63,6 +63,13 @@ do
echo >&2 "No Reviewed-by or Acked-by in commit $commit"
errors=$((errors+1))
fi
# 4. The commit message shall not contain a Change-Id.
if echo "$msg" | grep -q '^Change-Id:'
then
echo >&2 "Found Change-Id in commit $commit"
errors=$((errors+1))
fi
done
if [ $errors != 0 ]