tools/generate_authors.pl: avoid duplicates
authorPeter Wu <peter@lekensteyn.nl>
Sun, 27 Mar 2016 21:09:52 +0000 (23:09 +0200)
committerMichael Mann <mmann78@netscape.net>
Mon, 28 Mar 2016 02:47:55 +0000 (02:47 +0000)
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 <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
AUTHORS
AUTHORS.src
tools/generate_authors.pl

diff --git a/AUTHORS b/AUTHORS
index 9df83c25c96b72a731b0e9f4cf7b13af0b249d6c..8b9b61befa16d995a1e22003fa49ae93f9efe9f6 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -3523,6 +3523,7 @@ Subramanian Ramachandran <sramach6[AT]ncsu.edu> {
 
 Manuel Hofer           <manuel[At]mnlhfr.at> {
        OpenVPN dissector
+       SSTP Dissection
 }
 
 Gaurav Patwardhan      <gspatwar[AT]ncsu.edu> {
@@ -3658,10 +3659,6 @@ Dario Lombardo           <lomato[AT]gmail.com> {
        HCrt (Hotline Command-Response Transaction) dissector
 }
 
-Manuel Hofer           <manuel[AT]mnlhfr.at> {
-  SSTP Dissection
-}
-
 Pratik Yeole           <pyeole[AT]ncsu.edu> {
          Fixed incorrect decoding of Network Layer Reachability Information (NLRI) in BGP UPDATE message with add-path support
 }
@@ -3952,7 +3949,6 @@ Andreas Urke              <arurke[AT]netwurke.com>
 Andrei Cipu            <acipu[AT]ixiacom.com>
 Andrew Chernyh         <andrew.chernyh[AT]gmail.com>
 Andrew Hoag            <Andrew.Hoag[AT]aireon.com>
-Andrew Hoag            <andrew.hoag[AT]aireon.com>
 Andy Ling              <Andy.Ling[AT]quantel.com>
 Andy Ling              <andy.ling[AT]s-a-m.com>
 Anndy Ke               <anndymaktub[AT]yahoo.com.tw>
@@ -4064,7 +4060,6 @@ Joseph Huffman            <jhuffman[AT]codeaurora.org>
 Josip Medved           <jmedved[AT]jmedved.com>
 Juan Jose Martin Carrascosa <juanjo[AT]rti.com>
 Juan Matias            <jmrepetti[AT]gmail.com>
-Juanjo Martin          <juanjo[AT]rti.com>
 Julien STAUB           <atsju2[AT]yahoo.fr>
 Jun Wang               <sdn_app[AT]163.com>
 JustinKu               <jiunrong[AT]gmail.com>
@@ -4143,7 +4138,6 @@ Pedro Jose Marron <pjmarron[AT]locoslab.com>
 Peng Li                        <seudut[AT]gmail.com>
 Peng Tao               <tao.peng[AT]primarydata.com>
 Peter Membrey          <peter[AT]membrey.hk>
-Peter Palúch          <Peter.Paluch[AT]fri.uniza.sk>
 Peter Ross             <peter.ross[AT]dsto.defence.gov.au>
 Petr Gotthard          <petr.gotthard[AT]honeywell.com>
 Petr Štetiar          <petr.stetiar[AT]gaben.cz>
index 91f7d5109521d1714578d7e74dfb995eb31d5fb6..efd1787e21fa8a2e98ec6760b5ade54a5185de95 100644 (file)
@@ -3523,6 +3523,7 @@ Subramanian Ramachandran <sramach6[AT]ncsu.edu> {
 
 Manuel Hofer           <manuel[At]mnlhfr.at> {
        OpenVPN dissector
+       SSTP Dissection
 }
 
 Gaurav Patwardhan      <gspatwar[AT]ncsu.edu> {
@@ -3658,10 +3659,6 @@ Dario Lombardo           <lomato[AT]gmail.com> {
        HCrt (Hotline Command-Response Transaction) dissector
 }
 
-Manuel Hofer           <manuel[AT]mnlhfr.at> {
-  SSTP Dissection
-}
-
 Pratik Yeole           <pyeole[AT]ncsu.edu> {
          Fixed incorrect decoding of Network Layer Reachability Information (NLRI) in BGP UPDATE message with add-path support
 }
index 00f7a2f7690b9facab7606bd74fb39f1c3db74a6..187abf670f2d87f3929a0a5c1c0e0f442a49a89f 100755 (executable)
@@ -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");
                        }
                }