From ea062976b8d6421a09afde16fb8ec6174f61cb60 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 27 Mar 2016 23:09:52 +0200 Subject: [PATCH] tools/generate_authors.pl: avoid duplicates Officially, the local part of an email address is case sensitive, but in practice this is ignored. Ensure that duplicate email addresses are not listed. While at it, detect duplicates using `grep -Po '<\K[^>]+' AUTHORS | tr '[:upper:]' '[:lower:]' | sort | uniq -cd` and resolve them. Change-Id: Ie1e853d6253758c8454d9583f0a11f317c8390cb Reviewed-on: https://code.wireshark.org/review/14659 Reviewed-by: Peter Wu Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- AUTHORS | 8 +------- AUTHORS.src | 5 +---- tools/generate_authors.pl | 14 +++++++------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9df83c25c9..8b9b61befa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3523,6 +3523,7 @@ Subramanian Ramachandran { Manuel Hofer { OpenVPN dissector + SSTP Dissection } Gaurav Patwardhan { @@ -3658,10 +3659,6 @@ Dario Lombardo { HCrt (Hotline Command-Response Transaction) dissector } -Manuel Hofer { - SSTP Dissection -} - Pratik Yeole { Fixed incorrect decoding of Network Layer Reachability Information (NLRI) in BGP UPDATE message with add-path support } @@ -3952,7 +3949,6 @@ Andreas Urke Andrei Cipu Andrew Chernyh Andrew Hoag -Andrew Hoag Andy Ling Andy Ling Anndy Ke @@ -4064,7 +4060,6 @@ Joseph Huffman Josip Medved Juan Jose Martin Carrascosa Juan Matias -Juanjo Martin Julien STAUB Jun Wang JustinKu @@ -4143,7 +4138,6 @@ Pedro Jose Marron Peng Li Peng Tao Peter Membrey -Peter Palúch Peter Ross Petr Gotthard Petr Štetiar diff --git a/AUTHORS.src b/AUTHORS.src index 91f7d51095..efd1787e21 100644 --- a/AUTHORS.src +++ b/AUTHORS.src @@ -3523,6 +3523,7 @@ Subramanian Ramachandran { Manuel Hofer { OpenVPN dissector + SSTP Dissection } Gaurav Patwardhan { @@ -3658,10 +3659,6 @@ Dario Lombardo { HCrt (Hotline Command-Response Transaction) dissector } -Manuel Hofer { - SSTP Dissection -} - Pratik Yeole { Fixed incorrect decoding of Network Layer Reachability Information (NLRI) in BGP UPDATE message with add-path support } diff --git a/tools/generate_authors.pl b/tools/generate_authors.pl index 00f7a2f769..187abf670f 100755 --- a/tools/generate_authors.pl +++ b/tools/generate_authors.pl @@ -1,10 +1,5 @@ #!/usr/bin/perl -my $debug = 0; -# 0: off -# 1: specific debug -# 2: full debug - # # Generate the AUTHORS file combining existing AUTHORS file with # git commit log. @@ -103,11 +98,13 @@ sub trim($) sub parse_author_name { my $full_name = $_[0]; + my $email_key; if ($full_name =~ /^([\w\.\-\'\x80-\xff]+(\s*[\w+\.\-\'\x80-\xff])*)\s+<([^>]*)>/) { #Make an exception for Gerald because he's part of the header if ($3 ne "gerald[AT]wireshark.org") { - $contributors{$3} = $1; + $email_key = lc($3); + $contributors{$email_key} = $1; print encode('UTF-8', "$full_name\n"); } } elsif ($full_name =~ /^([\w\.\-\'\x80-\xff]+(\s*[\w+\.\-\'\x80-\xff])*)\s+\(/) { @@ -120,6 +117,7 @@ sub parse_git_name { my $full_name = $_[0]; my $name; my $email; + my $email_key; my $len; my $ntab = 3; my $line; @@ -130,8 +128,9 @@ sub parse_git_name { #Convert real email address to "spam proof" one $email = trim($2); $email =~ s/@/[AT]/g; + $email_key = lc($email); - if (!exists($contributors{ $email })) { + if (!exists($contributors{ $email_key })) { #Make an exception for Gerald because he's part of the header if ($email ne "gerald[AT]wireshark.org") { $len = length $name; @@ -142,6 +141,7 @@ sub parse_git_name { $ntab +=1 if ($len % 8); $line = $name . "\t" x $ntab . "<$email>"; } + $contributors{$email_key} = $1; print encode('UTF-8', "$line\n"); } }