On 9/30/18 4:58 PM, Peter Maydell wrote:
> On 30 September 2018 at 15:54, Philippe Mathieu-Daudé <f4...@amsat.org> wrote:
>> Paolo, thanks for queuing all of this, however I note some UTF-8 issues.
>>
>> Alex got lucky:
>>
>>  Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
>>
>> But Marc-André and myself have:
>>
>>  Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
>>  Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>

I also missed Daniel in this PR:

    Suggested-by: Daniel P. Berrangé <berra...@redhat.com>

>>
>> Peter, could you add a merge check regex for the most common X-by: failures?
> 
> I don't object to adding a check, but it's more likely to happen
> if you have a suitable fragment of shell script I can drop into
> https://git.linaro.org/people/peter.maydell/misc-scripts.git/tree/apply-pullreq

I checked all non-ASCII names with:

$ git log e63c3dc.. \
| LC_ALL=C grep -P '^ +[[:alpha:]-]+-by: .*[^\x00-\x7f]' \
| cut -d: -f2- | sort -u

Reviewed-by: Andreas Färber <afaer...@suse.de>
Reviewed-by: Andreas F=E4rber <afaer...@suse.de>
Reviewed-by: Andreas F=C3=A4rber <afaer...@suse.de>
...
Signed-off-by: Hervé Poussineau <hpous...@reactos.org>
Signed-off-by: Herv? Poussineau <hpous...@reactos.org>
Signed-off-by: Hervé Poussineau <hpous...@reactos.org>

Since all other encoded char appear correctly, I used the following
regex as a starting point: '(=[0-9A-F]{2}|\?|é)'

-- >8 --
diff --git a/apply-pullreq b/apply-pullreq
index b0e8860..a7a3599 100755
--- a/apply-pullreq
+++ b/apply-pullreq
@@ -119,10 +119,17 @@ fi
 if git shortlog --author=qemu-devel@nongnu.org master..staging | grep
.; then
     echo "ERROR: pull request includes commits attributed to list"
     exit 1
 fi

+# Check for incorrect UTF-8 copy/pasting
+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
---

This will not catch all, but most of the errors from previous git history.

Regards,

Phil.

Reply via email to