File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,7 +122,6 @@ Gus <yo@soygus.com>
122122Gustav Simonsson <gustav.simonsson@gmail.com>
123123Gísli Kristjánsson <gislik@hamstur.is>
124124Ha ĐANG <dvietha@gmail.com>
125- hackyminer <hackyminer@gmail.com>
126125HackyMiner <hackyminer@gmail.com>
127126hadv <dvietha@gmail.com>
128127Hao Bryan Cheng <haobcheng@gmail.com>
@@ -257,7 +256,6 @@ Paul Litvak <litvakpol@012.net.il>
257256Paulo L F Casaretto <pcasaretto@gmail.com>
258257Paweł Bylica <chfast@gmail.com>
259258Pedro Pombeiro <PombeirP@users.noreply.github.com>
260- Pedro Pombeiro <pombeirp@users.noreply.github.com>
261259Peter Broadhurst <peter@themumbles.net>
262260Peter Pratscher <pratscher@gmail.com>
263261Petr Mikusek <petr@mikusek.info>
Original file line number Diff line number Diff line change @@ -275,27 +275,32 @@ func mailmapLookup(authors []string) []string {
275275}
276276
277277func writeAuthors (files []string ) {
278- merge := make (map [string ]bool )
278+ var (
279+ dedup = make (map [string ]bool )
280+ list []string
281+ )
279282 // Add authors that Git reports as contributors.
280283 // This is the primary source of author information.
281284 for _ , a := range gitAuthors (files ) {
282- merge [a ] = true
285+ if la := strings .ToLower (a ); ! dedup [la ] {
286+ list = append (list , a )
287+ dedup [la ] = true
288+ }
283289 }
284290 // Add existing authors from the file. This should ensure that we
285291 // never lose authors, even if Git stops listing them. We can also
286292 // add authors manually this way.
287293 for _ , a := range readAuthors () {
288- merge [a ] = true
294+ if la := strings .ToLower (a ); ! dedup [la ] {
295+ list = append (list , a )
296+ dedup [la ] = true
297+ }
289298 }
290299 // Write sorted list of authors back to the file.
291- var result []string
292- for a := range merge {
293- result = append (result , a )
294- }
295- sort .Sort (authors (result ))
300+ sort .Sort (authors (list ))
296301 content := new (bytes.Buffer )
297302 content .WriteString (authorsFileHeader )
298- for _ , a := range result {
303+ for _ , a := range list {
299304 content .WriteString (a )
300305 content .WriteString ("\n " )
301306 }
You can’t perform that action at this time.
0 commit comments