summaryrefslogtreecommitdiff
path: root/mailmap.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-03-31 02:18:36 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-01 11:00:54 -0700
commitbf637803a799451e7feb596422932dd60f0384e1 (patch)
tree749dee4fa3355dd679be1b2ff937d4148bd95ffa /mailmap.c
parent8c7f78823888306c1cceafcf5fd26739eef99ce3 (diff)
downloadgit-bf637803a799451e7feb596422932dd60f0384e1.tar.gz
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailmap.c')
-rw-r--r--mailmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mailmap.c b/mailmap.c
index f12bb45a3f..6be91b60df 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -50,6 +50,15 @@ static void add_mapping(struct string_list *map,
{
struct mailmap_entry *me;
int index;
+ char *p;
+
+ if (old_email)
+ for (p = old_email; *p; p++)
+ *p = tolower(*p);
+ if (new_email)
+ for (p = new_email; *p; p++)
+ *p = tolower(*p);
+
if (old_email == NULL) {
old_email = new_email;
new_email = NULL;