Commit b973edd 1 parent 1a83114 commit b973edd Copy full SHA for b973edd
File tree 2 files changed +14
-11
lines changed
2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,6 @@ Gus <yo@soygus.com>
122
122
Gustav Simonsson <gustav.simonsson@gmail.com>
123
123
Gísli Kristjánsson <gislik@hamstur.is>
124
124
Ha ĐANG <dvietha@gmail.com>
125
- hackyminer <hackyminer@gmail.com>
126
125
HackyMiner <hackyminer@gmail.com>
127
126
hadv <dvietha@gmail.com>
128
127
Hao Bryan Cheng <haobcheng@gmail.com>
@@ -257,7 +256,6 @@ Paul Litvak <litvakpol@012.net.il>
257
256
Paulo L F Casaretto <pcasaretto@gmail.com>
258
257
Paweł Bylica <chfast@gmail.com>
259
258
Pedro Pombeiro <PombeirP@users.noreply.github.com>
260
- Pedro Pombeiro <pombeirp@users.noreply.github.com>
261
259
Peter Broadhurst <peter@themumbles.net>
262
260
Peter Pratscher <pratscher@gmail.com>
263
261
Petr Mikusek <petr@mikusek.info>
Original file line number Diff line number Diff line change @@ -275,27 +275,32 @@ func mailmapLookup(authors []string) []string {
275
275
}
276
276
277
277
func writeAuthors (files []string ) {
278
- merge := make (map [string ]bool )
278
+ var (
279
+ dedup = make (map [string ]bool )
280
+ list []string
281
+ )
279
282
// Add authors that Git reports as contributors.
280
283
// This is the primary source of author information.
281
284
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
+ }
283
289
}
284
290
// Add existing authors from the file. This should ensure that we
285
291
// never lose authors, even if Git stops listing them. We can also
286
292
// add authors manually this way.
287
293
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
+ }
289
298
}
290
299
// 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 ))
296
301
content := new (bytes.Buffer )
297
302
content .WriteString (authorsFileHeader )
298
- for _ , a := range result {
303
+ for _ , a := range list {
299
304
content .WriteString (a )
300
305
content .WriteString ("\n " )
301
306
}
You can’t perform that action at this time.
0 commit comments