path: root/mailmap.h
diff options
authorAntoine Pelisse <>2013-01-05 21:26:40 (GMT)
committerJunio C Hamano <>2013-01-10 20:33:08 (GMT)
commitea02ffa38571084007eb7c63f650d0011e44a3dd (patch)
tree48f448e4a768c32fbed199fde549cc5df6acf96e /mailmap.h
parent388c7f8a275a40697cee2eec5fb124ae8457bf77 (diff)
mailmap: simplify map_user() interface
Simplify map_user(), mostly to avoid copies of string buffers. It also simplifies caller functions. map_user() directly receive pointers and length from the commit buffer as mail and name. If mapping of the user and mail can be done, the pointer is updated to a new location. Lengths are also updated if necessary. The caller of map_user() can then copy the new email and name if necessary. Signed-off-by: Antoine Pelisse <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'mailmap.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/mailmap.h b/mailmap.h
index d5c3664..ed7c93b 100644
--- a/mailmap.h
+++ b/mailmap.h
@@ -4,7 +4,7 @@
int read_mailmap(struct string_list *map, char **repo_abbrev);
void clear_mailmap(struct string_list *map);
-int map_user(struct string_list *mailmap,
- char *email, int maxlen_email, char *name, int maxlen_name);
+int map_user(struct string_list *map,
+ const char **email, size_t *emaillen, const char **name, size_t *namelen);