[libvirt] another AUTHORS update

Jim Meyering jim at meyering.net
Fri May 28 09:33:04 UTC 2010


Eric Blake wrote:
> Eduardo Otubo contacted me off-list, noticing that his name was not yet
> in AUTHORS even though he has had commits in the past.  I've rectified
> this situation with an obvious commit; not worth posting the diff to the
> list (to avoid unnecessary exposure of all the email addresses...).

Here's a rule to help us automate the task of keeping
our AUTHORS file in sync with the commit history:

[I know some are sensitive about having their email
addresses appear "in the clear", so I've manually mangled
the .mailmap contents in this message by filtering it through rot13.
Obviously, .mailmap will not be obfuscated in the repository. ]

>From e19a035f7c1a4ca5fcdcc58033b8a1c42ef19fa9 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 28 May 2010 11:27:12 +0200
Subject: [PATCH] maint: new syntax-check rule to ensure that AUTHORS stays in sync

* cfg.mk (sc_check_author_list): New rule.
* .mailmap: New file, to tell git log how to map email addresses.
---
 .mailmap |   12 ++++++++++++
 cfg.mk   |   14 ++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 .mailmap

diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..dff04b9
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,12 @@
+<nzl.tevssvf at uc.pbz> <neba.tevssvf at uc.pbz>
+<obmmbyna at tznvy.pbz> <erqfuvsg at tzk.pbz>
+<puneyrf_qhssl at zrffntrbar.pbz> <puneyrf at qlsvf.arg>
+<qsw at erqung.pbz> <qsw at qsw.oar.erqung.pbz>
+<roynxr at erqung.pbz> <roo9 at olh.arg>
+<tqbyyrl at necargjbexf.pbz> <tqbyyrl at hpyn.rqh>
+<treuneq.fgramry at qr.voz.pbz> <tfgramry at yvahk.iarg.voz.pbz>
+<wnzvr at pnabavpny.pbz> <wnzvr at hohagh.pbz>
+<ynvar at erqung.pbz> <ynvar at ynvar.bet>
+<zrlrevat at erqung.pbz> <wvz at zrlrevat.arg>
+<fbpxrgcnve at tznvy.pbz> <fbpxrgcnve tznvy pbz>
+<fbera at pnabavpny.pbz> <fbera at hohagh.pbz>
diff --git a/cfg.mk b/cfg.mk
index bdf9ea9..e602df2 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -472,6 +472,20 @@ Makefile: _autogen
   endif
 endif

+# Give credit where due:
+# Ensure that each commit author email address (possibly mapped via
+# git log's .mailmap) appears in our AUTHORS file.
+sc_check_author_list:
+	@fail=0;							\
+	for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
+	  sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_ at -]\)/\\\1/g'); \
+	  grep -iq "<$$sanitized>" AUTHORS				\
+	    || { printf '%s\n' "$$i" >&2; fail=1; };			\
+	done;								\
+	test $$fail = 1							\
+	  && echo '$(ME): committer(s) not listed in AUTHORS' >&2;	\
+	test $$fail = 0
+
 # It is necessary to call autogen any time gnulib changes.  Autogen
 # reruns configure, then we regenerate all Makefiles at once.
 .PHONY: _autogen
--
1.7.1.348.gb26ba




More information about the libvir-list mailing list