[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] another AUTHORS update

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 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 uc pbz> <neba tevssvf uc pbz>
+<obmmbyna tznvy pbz> <erqfuvsg tzk pbz>
+<puneyrf_qhssl zrffntrbar pbz> <puneyrf qlsvf arg>
+<qsw erqung pbz> <qsw qsw oar erqung pbz>
+<roynxr erqung pbz> <roo9 olh arg>
+<tqbyyrl necargjbexf pbz> <tqbyyrl hpyn rqh>
+<treuneq fgramry qr voz pbz> <tfgramry yvahk iarg voz pbz>
+<wnzvr pnabavpny pbz> <wnzvr hohagh pbz>
+<ynvar erqung pbz> <ynvar ynvar bet>
+<zrlrevat erqung pbz> <wvz zrlrevat arg>
+<fbpxrgcnve tznvy pbz> <fbpxrgcnve tznvy pbz>
+<fbera pnabavpny pbz> <fbera 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

+# Give credit where due:
+# Ensure that each commit author email address (possibly mapped via
+# git log's .mailmap) appears in our AUTHORS file.
+	@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_ -]\)/\\\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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]