Merge branch 'jk/mailmap-cleanup'

Update various entries in our .mailmap file.

* jk/mailmap-cleanup:
  contrib: update stats/mailmap script
  .mailmap: normalize emails for Linus Torvalds
  .mailmap: normalize emails for Jeff King
  .mailmap: fix broken entry for Martin Langhoff
  .mailmap: match up some obvious names/emails
This commit is contained in:
Junio C Hamano 2012-12-21 15:18:20 -08:00
Родитель 18499ba694 53474eb92f
Коммит 675a0fe297
2 изменённых файлов: 82 добавлений и 33 удалений

Просмотреть файл

@ -9,7 +9,9 @@ Alex Bennée <kernel-hacker@bennee.com>
Alexander Gavrilov <angavrilov@gmail.com>
Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
Cheng Renquan <crquan@gmail.com>
Chris Shoemaker <c.shoemaker@cox.net>
Dan Johnson <computerdruid@gmail.com>
Dana L. How <danahow@gmail.com>
Dana L. How <how@deathvalley.cswitch.com>
Daniel Barkalow <barkalow@iabervon.org>
@ -18,14 +20,18 @@ David Kågedal <davidk@lysator.liu.se>
David S. Miller <davem@davemloft.net>
Deskin Miller <deskinm@umich.edu>
Dirk Süsserott <newsletter@dirk.my1.cc>
Eric S. Raymond <esr@thyrsus.com>
Erik Faye-Lund <kusmabite@gmail.com> <kusmabite@googlemail.com>
Fredrik Kuivinen <freku045@student.liu.se>
Frédéric Heitzmann <frederic.heitzmann@gmail.com>
H. Peter Anvin <hpa@bonde.sc.orionmulti.com>
H. Peter Anvin <hpa@tazenda.sc.orionmulti.com>
H. Peter Anvin <hpa@trantor.hos.anvin.org>
Horst H. von Brand <vonbrand@inf.utfsm.cl>
İsmail Dönmez <ismail@pardus.org.tr>
Jakub Narębski <jnareb@gmail.com>
Jay Soffian <jaysoffian+git@gmail.com>
Jeff King <peff@peff.net> <peff@github.com>
Joachim Berdal Haga <cjhaga@fys.uio.no>
Johannes Sixt <j6t@kdbg.org> <johannes.sixt@telecom.at>
Johannes Sixt <j6t@kdbg.org> <j.sixt@viscovery.net>
@ -41,12 +47,21 @@ Junio C Hamano <gitster@pobox.com> <junio@hera.kernel.org>
Junio C Hamano <gitster@pobox.com> <junio@kernel.org>
Junio C Hamano <gitster@pobox.com> <junkio@cox.net>
Karl Hasselström <kha@treskal.com>
Kevin Leung <kevinlsk@gmail.com>
Kent Engstrom <kent@lysator.liu.se>
Lars Doelle <lars.doelle@on-line ! de>
Lars Doelle <lars.doelle@on-line.de>
Li Hong <leehong@pku.edu.cn>
Linus Torvalds <torvalds@linux-foundation.org> <torvalds@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> <torvalds@osdl.org>
Linus Torvalds <torvalds@linux-foundation.org> <torvalds@g5.osdl.org>
Linus Torvalds <torvalds@linux-foundation.org> <torvalds@evo.osdl.org>
Linus Torvalds <torvalds@linux-foundation.org> <torvalds@ppc970.osdl.org>
Linus Torvalds <torvalds@linux-foundation.org> <torvalds@ppc970.osdl.org.(none)>
Lukas Sandström <lukass@etek.chalmers.se>
Martin Langhoff <martin@laptop.org>
Marc-André Lureau <marcandre.lureau@gmail.com>
Mark Rada <marada@uwaterloo.ca>
Martin Langhoff <martin@laptop.org> <martin@catalyst.net.nz>
Martin von Zweigbergk <martinvonz@gmail.com> <martin.von.zweigbergk@gmail.com>
Michael Coleman <tutufan@gmail.com>
Michael J Gruber <git@drmicha.warpmail.net> <michaeljgruber+gmane@fastmail.fm>
@ -63,11 +78,13 @@ Ralf Thielow <ralf.thielow@gmail.com> <ralf.thielow@googlemail.com>
Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Robert Fitzsimons <robfitz@273k.net>
Robert Zeh <robert.a.zeh@gmail.com>
Sam Vilain <sam@vilain.net>
Santi Béjar <sbejar@gmail.com>
Sean Estabrooks <seanlkml@sympatico.ca>
Shawn O. Pearce <spearce@spearce.org>
Steven Grimm <koreth@midwinter.com>
Tay Ray Chuan <rctay89@gmail.com>
Theodore Ts'o <tytso@mit.edu>
Thomas Rast <trast@inf.ethz.ch> <trast@student.ethz.ch>
Tony Luck <tony.luck@intel.com>

Просмотреть файл

@ -1,38 +1,70 @@
#!/usr/bin/perl -w
my %mailmap = ();
open I, "<", ".mailmap";
while (<I>) {
chomp;
next if /^#/;
if (my ($author, $mail) = /^(.*?)\s+<(.+)>$/) {
$mailmap{$mail} = $author;
}
}
close I;
#!/usr/bin/perl
my %mail2author = ();
open I, "git log --pretty='format:%ae %an' |";
while (<I>) {
chomp;
my ($mail, $author) = split(/\t/, $_);
next if exists $mailmap{$mail};
$mail2author{$mail} ||= {};
$mail2author{$mail}{$author} ||= 0;
$mail2author{$mail}{$author}++;
}
close I;
use warnings 'all';
use strict;
use Getopt::Long;
while (my ($mail, $authorcount) = each %mail2author) {
# %$authorcount is ($author => $count);
# sort and show the names from the most frequent ones.
my @names = (map { $_->[0] }
sort { $b->[1] <=> $a->[1] }
map { [$_, $authorcount->{$_}] }
keys %$authorcount);
if (1 < @names) {
for (@names) {
print "$_ <$mail>\n";
my $match_emails;
my $match_names;
my $order_by = 'count';
Getopt::Long::Configure(qw(bundling));
GetOptions(
'emails|e!' => \$match_emails,
'names|n!' => \$match_names,
'count|c' => sub { $order_by = 'count' },
'time|t' => sub { $order_by = 'stamp' },
) or exit 1;
$match_emails = 1 unless $match_names;
my $email = {};
my $name = {};
open(my $fh, '-|', "git log --format='%at <%aE> %aN'");
while(<$fh>) {
my ($t, $e, $n) = /(\S+) <(\S+)> (.*)/;
mark($email, $e, $n, $t);
mark($name, $n, $e, $t);
}
close($fh);
if ($match_emails) {
foreach my $e (dups($email)) {
foreach my $n (vals($email->{$e})) {
show($n, $e, $email->{$e}->{$n});
}
print "\n";
}
}
if ($match_names) {
foreach my $n (dups($name)) {
foreach my $e (vals($name->{$n})) {
show($n, $e, $name->{$n}->{$e});
}
print "\n";
}
}
exit 0;
sub mark {
my ($h, $k, $v, $t) = @_;
my $e = $h->{$k}->{$v} ||= { count => 0, stamp => 0 };
$e->{count}++;
$e->{stamp} = $t unless $t < $e->{stamp};
}
sub dups {
my $h = shift;
return grep { keys($h->{$_}) > 1 } keys($h);
}
sub vals {
my $h = shift;
return sort {
$h->{$b}->{$order_by} <=> $h->{$a}->{$order_by}
} keys($h);
}
sub show {
my ($n, $e, $h) = @_;
print "$n <$e> ($h->{$order_by})\n";
}