summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8e8125)
raw | patch | inline | side by side (parent: d8e8125)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 19 Nov 2006 16:29:14 +0000 (17:29 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 20 Nov 2006 06:59:05 +0000 (22:59 -0800) |
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-shortlog.c | patch | blob | history |
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index afc945663d03ea30691ccc7967d407b3aa173fae..4775c110ffa1de7603300b2ddc6bc18301d05789 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
while (fgets(buffer, sizeof(buffer), f) != NULL) {
char *end_of_name, *left_bracket, *right_bracket;
char *name, *email;
+ int i;
if (buffer[0] == '#')
continue;
if ((left_bracket = strchr(buffer, '<')) == NULL)
name = xmalloc(end_of_name - buffer + 1);
strlcpy(name, buffer, end_of_name - buffer + 1);
email = xmalloc(right_bracket - left_bracket);
- strlcpy(email, left_bracket + 1, right_bracket - left_bracket);
+ for (i = 0; i < right_bracket - left_bracket - 1; i++)
+ email[i] = tolower(left_bracket[i + 1]);
+ email[right_bracket - left_bracket - 1] = '\0';
path_list_insert(email, &mailmap)->util = name;
}
fclose(f);
return 0;
*p = '\0';
+ /* downcase the email address */
+ for (p = email; *p; p++)
+ *p = tolower(*p);
item = path_list_lookup(email, &mailmap);
if (item != NULL) {
const char *realname = (const char *)item->util;