Re: [PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-09 Thread Antoine Pelisse
+static struct string_list_item *lookup_prefix(struct string_list *map, + const char *string, size_t len) +{ + int i = string_list_find_insert_index(map, string, 1); + if (i 0) { + /* exact match */ + i =

Re: [PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-09 Thread Junio C Hamano
Antoine Pelisse apeli...@gmail.com writes: +static struct string_list_item *lookup_prefix(struct string_list *map, + const char *string, size_t len) +{ + int i = string_list_find_insert_index(map, string, 1); + if (i 0) { +

Re: [PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-09 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Antoine Pelisse apeli...@gmail.com writes: +static struct string_list_item *lookup_prefix(struct string_list *map, + const char *string, size_t len) +{ + int i = string_list_find_insert_index(map,

[PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-07 Thread Junio C Hamano
In map_user(), we have email pointer that points at the beginning of an e-mail address, but the buffer is not terminated with a NUL after the e-mail address. It typically has after the address, and it could have even more if it comes from author/committer line in a commit object. Or it may not