Skip to content

Commit c361180

Browse files
addaleaxtargos
authored andcommitted
tools: make mailmap processing for author list case-insensitive
This is to accommodate Myles Borins otherwise ending up with multiple entries due to different casing in the email πŸ™‚ PR-URL: #29608 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: SaΓΊl Ibarra CorretgΓ© <saghul@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a86b71f commit c361180

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

β€Žtools/update-authors.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ const path = require('path');
77
const fs = require('fs');
88
const readline = require('readline');
99

10+
class CaseIndifferentMap {
11+
_map = new Map();
12+
13+
get(key) { return this._map.get(key.toLowerCase()); }
14+
set(key, value) { return this._map.set(key.toLowerCase(), value); }
15+
}
16+
1017
const log = spawn(
1118
'git',
1219
// Inspect author name/email and body.
@@ -23,7 +30,7 @@ else
2330

2431
output.write('# Authors ordered by first contribution.\n\n');
2532

26-
const mailmap = new Map();
33+
const mailmap = new CaseIndifferentMap();
2734
{
2835
const lines = fs.readFileSync(path.resolve(__dirname, '../', '.mailmap'),
2936
{ encoding: 'utf8' }).split('\n');

0 commit comments

Comments
Β (0)