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