diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-23 16:56:23 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-08-23 16:56:23 +0100 |
commit | fe7301efaccf66528c9c27a97cda66bcc3ba472a (patch) | |
tree | 05858b377737b1060f3f26fbe82b64579ef08c92 | |
parent | 80d833ce49e77ff8e667a31f40abf4f33a528835 (diff) |
apply-pullreq: Add basic mangled-UTF-8 check
Add a basic check that looks for some common kinds of
mangled UTF-8 in commit messages.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | apply-pullreq | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apply-pullreq b/apply-pullreq index b0e8860..be5f22f 100755 --- a/apply-pullreq +++ b/apply-pullreq @@ -121,6 +121,16 @@ if git shortlog --author=qemu-devel@nongnu.org master..staging | grep .; then exit 1 fi + +# Check for incorrect UTF-8 copy/pasting +# This is a very dubious heuristic that is essentially just looking +# for mangled é or for =nn hex escapes. Still, it's better than nothing. +if git log master..staging \ + | grep -E "^ +[[:alpha:]-]+-by: .*(=[0-9A-F]{2}|é).*@"; then + echo "ERROR: pull request includes tag with UTF-8 error in person name" + exit 1 +fi + # This should exit with an error status if any of the sub-builds fails. parallel-buildtest |