Skip to content

Commit bf63780

Browse files
dschogitster
authored andcommitted
mailmap: resurrect lower-casing of email addresses
Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the lower-casing of email addresses. This mostly did not matter if your .mailmap has only lower-case email addresses; However, we did not require .mailmap to contain lowercase-only email addresses. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8c7f788 commit bf63780

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mailmap.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ static void add_mapping(struct string_list *map,
5050
{
5151
struct mailmap_entry *me;
5252
int index;
53+
char *p;
54+
55+
if (old_email)
56+
for (p = old_email; *p; p++)
57+
*p = tolower(*p);
58+
if (new_email)
59+
for (p = new_email; *p; p++)
60+
*p = tolower(*p);
61+
5362
if (old_email == NULL) {
5463
old_email = new_email;
5564
new_email = NULL;

0 commit comments

Comments
 (0)