From: Jim Meyering Date: Fri, 28 May 2010 09:27:12 +0000 (+0200) Subject: maint: new syntax-check rule to ensure that AUTHORS stays in sync X-Git-Tag: v0.8.2~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=208b2ad879e6fcb30730af1f24ba6ed843bfcd79;p=thirdparty%2Flibvirt.git 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. --- diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000..dff04b9ab1 --- /dev/null +++ b/.mailmap @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/cfg.mk b/cfg.mk index bdf9ea9da4..1f63a804d9 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