On 03/26/2018 11:12 AM, Peter Maydell wrote:
but it would be nice if we can improve our tooling to prevent future
instances of the recurring problem.
Yuck. (Maybe we should try whatever the other workaround for
this SPF vs mailing lists problem is?)
If you can suggest a patch to my apply-pullreq script I'm
happy to change it to reject these at pull application time.
https://git.linaro.org/people/peter.maydell/misc-scripts.git/tree/apply-pullreq
My first quick attempt:
diff --git i/apply-pullreq w/apply-pullreq
index a5528e4..9ae4b8f 100755
--- i/apply-pullreq
+++ w/apply-pullreq
@@ -104,6 +104,12 @@ if git diff master..staging | grep -q 'Subproject
commit'; then
echo "WARNING: pull appears to include submodule update, please
check it!"
fi
+# Check whether any authors needs to be corrected after SPF rewrites
+if git shortlog --author=qemu-devel@nongnu.org master..staging | grep
.; then
+ echo "ERROR: pull request includes commits attributed to list"
+ exit 1
+fi
+
# This should exit with an error status if any of the sub-builds fails.
parallel-buildtest
Hmm, on re-reading that, I wonder if shortlog will do the right thing
when a .mailmap entry exists. I'm trying to make sure we don't have to
go lower-level with use of 'git log --format=%ae' (vs. --format=%aE
and/or log --use-mailmap).
/me goes and experiments with:
diff --git i/.mailmap w/.mailmap
index cf689b9ec99..a90d7deebe6 100644
--- i/.mailmap
+++ w/.mailmap
@@ -10,6 +10,7 @@ Edgar E. Iglesias <edgar.igles...@gmail.com> edgar_igl
<edgar_igl@c046a42c-6fe2-
Fabrice Bellard <fabr...@bellard.org> bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
James Hogan <jho...@kernel.org> <james.ho...@imgtec.com>
Jocelyn Mayer <l_ind...@magic.fr> j_mayer
<j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
+Julia Suvorova <<jus...@mail.ru> Julia Suvorova via Qemu-devel
<qemu-devel@nongnu.org>
Paul Brook <p...@codesourcery.com> pbrook
<pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Paul Burton <paul.bur...@mips.com> <paul.bur...@imgtec.com>
Paul Burton <paul.bur...@mips.com> <p...@archlinuxmips.org>
Yay - shortlog still lists Julia's commit even with the mailmap in place
(but with a better spelling of her name), so I don't need to try
anything fancier. I'll post a separate patch for mailmap, then leave it
up to you whether to incorporate my shortlog snippet above into your
build script.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org