Resurrecting a patch I started work on over two years ago...
I'll push this next year.

>From 886f1b958a06c62a8b4a3579d7e330ac2f255d12 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Mon, 17 Nov 2008 12:05:27 +0100
Subject: [PATCH] maint: generate much of the THANKS file

Before this change, we had a tendency to manually list each
contributor's name in THANKS.  Now, each commit "Author" is
included in the generated THANKS file automatically, and most
of the old THANKS file is now a template, THANKS.in.
We'll still have to manually list the names of people who report
problems without a usable patch.

* THANKS.in: New file, derived from THANKS, but removing names of
those who are listed as git log 'Author:'s.
* THANKS: Remove file.
* thanks-gen: New file.
* Makefile.am (THANKS): New rule.
(EXTRA_DIST): Add .mailmap, THANKS.in and thanks-gen.
* .gitignore: Add THANKS and THANKS-to-translators.
* .mailmap: Unify on single address and name-spelling per contributor.
---
 .gitignore          |    2 +
 .mailmap            |   25 ++++++++++++++++++--
 Makefile.am         |   27 +++++++++++++++++++++-
 THANKS => THANKS.in |   62 +++++++++-----------------------------------------
 thanks-gen          |   16 +++++++++++++
 5 files changed, 77 insertions(+), 55 deletions(-)
 rename THANKS => THANKS.in (92%)
 create mode 100755 thanks-gen

diff --git a/.gitignore b/.gitignore
index cd73b9a..7fead3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -81,3 +81,5 @@ ID
 Makefile
 Makefile.in
 TAGS
+THANKS
+THANKS-to-translators
diff --git a/.mailmap b/.mailmap
index d4fcef5..e3d7a27 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,12 +1,31 @@
 # Map git author names and email addresses to canonical/preferred form.
 <[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
 <[email protected]> <[email protected]>
 <[email protected]> <[email protected]>
-Paul R. Eggert <[email protected]> <[email protected]>
-Paul R. Eggert <[email protected]> <[email protected]>
+Paul Eggert <[email protected]> <[email protected]>
+Paul Eggert <[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+
 # Evan's two changes listed my email address.
 Evan Hunt <[email protected]> Evan Hunt <[email protected]>
+
 <[email protected]> <[email protected]  (trivial change)>
-Pádraig Brady <[email protected]> <[email protected]>
+Pádraig Brady <[email protected]> <[email protected]>
 <[email protected]> <[email protected]>
 <[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+
+# Prefer spelled-out middle name and its address.
+Arne Henrik Juul <[email protected]> Arne H. Juul <[email protected]>
+
+# Had email as name.
+Dan Jacobson <[email protected]> [email protected] <[email protected]>
diff --git a/Makefile.am b/Makefile.am
index b61229d..4fc6e8e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,9 +68,11 @@ syntax_check_exceptions =            \
 EXTRA_DIST =                           \
   $(changelog_etc)                     \
   $(syntax_check_exceptions)           \
+  .mailmap                             \
   .prev-version                                \
   .version                             \
   .vg-suppressions                     \
+  THANKS.in                            \
   THANKS-to-translators                        \
   THANKStt.in                          \
   bootstrap                            \
@@ -79,7 +81,8 @@ EXTRA_DIST =                          \
   cfg.mk                               \
   dist-check.mk                                \
   gl/modules/getloadavg.diff           \
-  maint.mk
+  maint.mk                             \
+  thanks-gen

 ALL_RECURSIVE_TARGETS += install-root
 install-root:
@@ -152,3 +155,25 @@ check-ls-dircolors:
          |sed -n '/^  *"/p'|tr , '\n'|sed 's/^  *//'           \
          |sed -n 's/^"\(..\)"/\1/p'|sort -u);                  \
        test "$$dc" = "$$ls"
+
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
+# Extract all lines up to the first one starting with "##".
+prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in
+
+THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
+       $(AM_V_GEN)                                                     \
+       {                                                               \
+         $(prologue); echo;                                            \
+         { perl -ne '/^$$/.../^$$/ and print' $(srcdir)/THANKS.in      \
+             | grep -v '^$$' | perl -pe 's/  +/\0/';                   \
+           git log --pretty=format:'%aN%x00%aE'                        \
+             | $(ASSORT) -u;                                           \
+         } | $(srcdir)/thanks-gen                                      \
+           | LC_ALL=en_US.UTF-8 sort -f;                               \
+         echo;                                                         \
+         printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:;     \
+       } > $...@-t && mv $...@-t $@
diff --git a/THANKS b/THANKS.in
similarity index 92%
rename from THANKS
rename to THANKS.in
index 311fa5b..b475eef 100644
--- a/THANKS
+++ b/THANKS.in
@@ -1,14 +1,19 @@
 These people have contributed to the GNU coreutils (formerly, the fileutils,
 textutils, and/or sh-utils packages).  Some have reported problems, others
 have contributed improvements to the documentation, actual code, and even
-complete programs.  Those contributions are described in the ChangeLog
-files.  If your name has been left out, if you'd rather not be listed,
-or if you'd prefer a different address be used, please send a note to
-the bug-report mailing list (as seen on last line of e.g., cp --help).
+complete programs.  Those contributions are described in the version control
+logs and ChangeLog files.  If your name has been left out, if you'd rather
+not be listed, or if you'd prefer a different address be used, please send a
+note to the bug-report mailing list (as seen at end of e.g., cp --help).
+##
+## There is no need to list here any name that appears as an Author in
+## "git log" output.  Those are automatically added when this template
+## is used to generate the THANKS file.  Note that numerous people listed
+## here would have been listed as commit authors if we had been using git
+## for version control when they contributed.

 ???                                 [email protected]
 A Costa                             [email protected]
-Aaron Burgemeister                  [email protected]
 Aaron Hawley                        [email protected]
 Achim Blumensath                    [email protected]
 Adam Jimerson                       [email protected]
@@ -39,12 +44,10 @@ Andreas Frische                     [email protected]
 Andreas Gruenbacher                 [email protected]
 Andreas Jaeger                      [email protected]
 Andreas Luik                        [email protected]
-Andreas Schwab                      [email protected]
 Andreas Stolcke                     [email protected]
 Andrei Gaponenko                    [email protected]
 Andres Soolo                        [email protected]
 Andrew Burgess                      [email protected]
-Andrew Church                       [email protected]
 Andrew Dalke                        [email protected]
 Andrew Fabbro                       [email protected]
 Andrew Pham                         [email protected]
@@ -56,15 +59,12 @@ Anthony Thyssen                     [email protected]
 Antonio Rendas                      [email protected]
 Ariel Faigon                        [email protected]
 Arjan Opmeer                        [email protected]
-Arne H. Juul                        [email protected]
 Arne Henrik Juul                    [email protected]
 Arnold Robbins                      [email protected]
 Arthur Pool                         [email protected]
 Arun Sharma                         [email protected]
 Arvind Autar                        [email protected]
-Assaf Gordon                        [email protected]
 Augey Mikus                         [email protected]
-Aurelien Jarno                      [email protected]
 Austin Donnelly                     [email protected]
 Axel Kittenberger                   [email protected]
 Barry Kelly                         http://barrkel.blogspot.com/
@@ -73,7 +73,6 @@ Ben Elliston                        [email protected]
 Ben Harris                          [email protected]
 Bengt Martensson                    [email protected]
 Benjamin Cutler                     [email protected]
-Benno Schulenberg                   [email protected]
 Bernard Giroud                      [email protected]
 Bernd Eckenfels                     [email protected]
 Bernd Leibing                       [email protected]
@@ -88,17 +87,13 @@ Bill Brelsford                      [email protected]
 Bill Peters                         [email protected]
 Bjorn Helgaas                       [email protected]
 Bob McCracken                       [email protected]
-Bob Proulx                          [email protected]
 Branden Robinson                    [email protected]
 Brendan O'Dea                       [email protected]
 Brian Kimball                       [email protected]
 Brian M. Carlson                    [email protected]
 Brian Silverman                     [email protected]
 Brian Youmans                       [email protected]
-Bruce Korb                          [email protected]
 Bruce Robertson                     [email protected]
-Bruno Haible                        [email protected]
-C de-Avillez                        [email protected]
 Carl Johnson                        [email protected]
 Carl Lowenstein                     [email protected]
 Carl Roth                           [email protected]
@@ -106,7 +101,6 @@ Carlos Canau                        
[email protected]
 Charles Karney                      [email protected]
 Charles Randall                     [email protected]
 Chas. Owens                         [email protected]
-Chen Guo                            [email protected]
 Chip Salzenberg                     [email protected]
 Chris Clayton                       [email protected]
 Chris Faylor                        [email protected]
@@ -124,7 +118,6 @@ Christophe LYON                     [email protected]
 Chuck Hedrick                       [email protected]
 Clark Morgan                        [email protected]
 Clement Wang                        [email protected]
-Cliff Miller                        [email protected]
 Colin Plumb                         [email protected]
 Colin Watson                        [email protected]
 Collin Rogowski                     [email protected]
@@ -134,11 +127,8 @@ Cyril Bouthors                      [email protected]
 Dale Scheetz                        [email protected]
 Dameon G. Rogers                    [email protected]
 Dan Hagerty                         [email protected]
-Dan Hipschman                       [email protected]
-Dan Jacobson                        [email protected]
 Dan Pascu                           [email protected]
 Daniel Bergstrom                    [email protected]
-Daniel Dunbar                       [email protected]
 Daniel P. Berrangé                  [email protected]
 Dániel Varga                        [email protected]
 Danny Levinson                      [email protected]
@@ -146,7 +136,6 @@ Darrel Francis                      [email protected]
 Darren Salt                         [email protected]
 Dave Beckett                        [email protected]
 David Alan Gilbert                  [email protected]
-David Bartley                       [email protected]
 David Dyck                          [email protected]
 David Eisner                        [email protected]
 David Flynn                         [email protected]
@@ -167,14 +156,12 @@ Dick Streefland                     
[email protected]
 Dirk Lattermann                     [email protected]
 Dirk-Jan Faber                      [email protected]
 Dmitry Rutsky                       [email protected]
-Dmitry V. Levin                     [email protected]
 Don Parsons                         [email protected]
 Donni Erpel                         [email protected]
 Doug Coleman                        [email protected]
 Doug McLaren                        [email protected]
 Dragos Harabor                      [email protected]
 Duncan Roe                          [email protected]
-Ed Avis                             [email protected]
 Edward Welbourne                    [email protected]
 Edzer Pebesma                       [email protected]
 Egmont Koblinger                    [email protected]
@@ -182,18 +169,14 @@ Eirik Fuller                        [email protected]
 Eivind                              [email protected]
 Elbert Pol                          [email protected]
 Eli Zaretskii                       [email protected]
-Elias Pipping                       [email protected]
 Emile LeBlanc                       [email protected]
 Emmanuel Lacour                     [email protected]
-Erik Auerswald                      [email protected]
 Eric Backus                         [email protected]
-Eric Blake                          [email protected]
 Eric G. Miller                      [email protected]
 Eric Pemente                        [email protected]
 Eric S. Raymond                     [email protected]
 Erik Bennett                        [email protected]
 Erik Corry                          [email protected]
-Evan Hunt                           [email protected]
 Felix Lee                           [email protected]
 Felix Rauch Valenti                 [email protected]
 Ferdinand                           [email protected]
@@ -268,10 +251,8 @@ James Antill                        
jmanti%[email protected]
 James Lemley                        [email protected]
 James Hunt                          [email protected]
 James Ralston                       [email protected]
-James R. Van Zandt                  [email protected]
 James Sneeringer                    [email protected]
 James Tanis                         [email protected]
-James Youngman                      [email protected]
 Jamie Lokier                        [email protected]
 Jamie McClelland                    [email protected]
 Jan Engelhardt                      [email protected]
@@ -299,13 +280,11 @@ Jim Dennis                          [email protected]
 Joakim Rosqvist                     [email protected]
 Jochen Hein                         [email protected]
 Joe Orton                           [email protected]
-Joel E. Denny                       [email protected]
 Joerg Sonnenberger                  [email protected]
 Joey Hess                           [email protected]
 Johan Boule                         [email protected]
 Johan Danielsson                    [email protected]
 John Bley                           [email protected]
-John David Anglin                   [email protected]
 John Gatewood Ham                   [email protected]
 John Gotts                          [email protected]
 John Kendall                        [email protected]
@@ -344,7 +323,6 @@ Keith Owens                         [email protected]
 Keith Thompson                      [email protected]
 Ken Pizzini                         [email protected]
 Kevin Mudrick                       [email protected]
-Kim Hansen                          [email protected]
 Kirk Kelsey                         [email protected]
 Kristin E Thomas                    [email protected]
 Kjetil Torgrim Homme                [email protected]
@@ -410,7 +388,6 @@ Matthew Clarke                      
[email protected]
 Matthew S. Levine                   [email protected]
 Matthew Smith                       [email protected]
 Matthew Swift                       [email protected]
-Matthew Woehlke                     [email protected]
 Matthias Urlichs                    [email protected]
 Matti Aarnio                        [email protected]
 Mathias Brodala                     [email protected]
@@ -429,9 +406,7 @@ Michael J. Croghan                  [email protected]
 Michael McFarland                   [email protected]
 Michael McLagan                     [email protected]
 Michael Piefel                      [email protected]
-Michael Speer                       [email protected]
 Michael Steffens                    [email protected]
-Michael Stone                       [email protected]
 Michael Stutz                       [email protected]
 Michael van Elst                    [email protected]
 Michael Veksler                     [email protected]
@@ -440,11 +415,9 @@ Michal Politowski                   
[email protected]
 Michal Svec                         [email protected]
 Michel Robitaille                   [email protected]
 Michiel Bacchiani                   [email protected]
-Mikael Magnusson                    [email protected]
 Mike Castle                         [email protected]
 Mike Coleman                        [email protected]
 Mike Jetzer                         [email protected]
-Mike Frysinger                      [email protected]
 Mikko Tuumanen                      [email protected]
 Mikulas Patocka                     [email protected]
 Miles Bader                         [email protected]
@@ -472,10 +445,8 @@ Olivier Fourdan                     [email protected]
 Ørn E. Hansen                       [email protected]
 Oskar Liljeblad                     [email protected]
 Otavio Salvador                     [email protected]
-Pádraig Brady                       [email protected]
 Patrick Mauritz                     [email protected]
 Paul D. Smith                       [email protected]
-Paul Eggert                         [email protected]
 Paul Ghaleb                         [email protected]
 Paul Jarc                           [email protected]
 Paul Nevai                          [email protected]
@@ -490,17 +461,14 @@ Per Starbäck                        
[email protected]
 Peter Breitenlohner                 [email protected]
 Peter Dyballa                       [email protected]
 Peter Eriksson                      [email protected]
-Peter Fales                         [email protected]
 Peter Horst                         [email protected]
 Peter Moulder                       [email protected]
-Peter O'Gorman                      [email protected]
 Peter Samuelson                     [email protected]
 Peter Seebach                       [email protected]
 Petr Uzel                           [email protected]
 Petter Reinholdtsen                 [email protected]
 Phelippe Neveu                      [email protected]
 Phil Richards                       [email protected]
-Philip Rowlands                     [email protected]
 Philippe De Muyter                  [email protected]
 Philippe Schnoebelen                [email protected]
 Phillip Jones                       [email protected]
@@ -512,12 +480,9 @@ Prashant TR                         [email protected]
 Priit Jõerüüt                       [email protected]
 Rainer Orth                         [email protected]
 Ralf W. Stephan                     [email protected]
-Ralf Wildenhues                     [email protected]
 Ralph Loader                        [email protected]
 Raul Miller                         [email protected]
 Raúl Núñez de Arenas Coronado       [email protected]
-Reuben Thomas                       [email protected]
-Yang Ren                            [email protected]
 Richard A Downing                   [email protected]
 Richard Braakman                    [email protected]
 Richard Dawe                        [email protected]
@@ -560,7 +525,6 @@ Solar Designer                      [email protected]
 Stanislav Ievlev                    [email protected]
 Stavros Passas                      [email protected]
 Stéphane Chazelas                   [email protected]
-Stéphane Raimbault                  [email protected]
 Stephen Depooter                    [email protected]
 Stephen Eglen                       [email protected]
 Stephen Gildea                      [email protected]
@@ -577,13 +541,11 @@ Steven P Watson                     [email protected]
 Stuart Citrin                       [email protected]
 Stuart Kemp                         [email protected]
 Stuart Shelton                      [email protected]
-Sven Joachim                        [email protected]
 Szakacsits Szabolcs                 [email protected]
 Tadayoshi Funaba                    [email protected]
 TAKAI Kousuke                       [email protected]
 Theodore Ts'o                       [email protected]
 The Wanderer                        [email protected]
-Theodoros V. Kalamatianos           [email protected]
 Thomas Bushnell                     [email protected]
 Thomas Goerlich                     [email protected]
 Thomas Hood                         [email protected]
@@ -597,8 +559,6 @@ Tim Mooney                          
[email protected]
 Tim Ryan                            [email protected]
 Tim Smithers                        [email protected]
 Tim Waugh                           twa...@redhat
-Tobias Quathamer                    [email protected]
-Tobias Stoeckmann                   [email protected]
 Toby Peterson                       [email protected]
 Todd A. Jacobs                      [email protected]
 Tom Fitzhenry                       [email protected]
@@ -644,10 +604,10 @@ Wis Macomson                        [email protected]
 Wojciech Purczynski                 [email protected]
 Wolfram Kleff                       [email protected]
 Won-kyu Park                        [email protected]
+Yang Ren                            [email protected]
 Yanko Kaneti                        [email protected]
 Yann Dirson                         [email protected]
 Yutaka Amanai                       [email protected]
-Zvi Har'El                          [email protected]

 ;; Local Variables:
 ;; coding: utf-8
diff --git a/thanks-gen b/thanks-gen
new file mode 100755
index 0000000..f1c11b3
--- /dev/null
+++ b/thanks-gen
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -nl
+# Use Perl's multi-byte alignment code, via sprintf, while
+# performing a rudimentary check for duplicate names and
+# removing duplicate name,email pairs.
+use Encode;
+
+BEGIN { my (%seen, %name) }
+
+chomp;
+my ($name, $email) = split '\0', decode ('UTF-8', $_);
+
+$seen{$name}++
+  and warn "$0: THANKS.in: duplicate name: $name\n";
+
+print encode ('UTF-8', sprintf ('%-36s', $name)), $email
+  unless $seen{"$name\0$email"}++;
--
1.7.3.4

Reply via email to