path: root/mailmap.h
diff options
authorMarius Storm-Olsen <>2009-02-08 14:34:29 (GMT)
committerJunio C Hamano <>2009-02-08 20:36:38 (GMT)
commit0925ce4d49ef8352617e8f56231bd36802a2f138 (patch)
treed6865f15a060e43220bf8de9ba4d27fa022bd50a /mailmap.h
parentcfa1ee6b340172a415049704cd848593392b9064 (diff)
Add map_user() and clear_mailmap() to mailmap
map_user() allows to lookup and replace both email and name of a user, based on a new style mailmap file. The possible mailmap definitions are now: proper_name <commit_email> # Old style <proper_email> <commit_email> # New style proper_name <proper_email> <commit_email> # New style proper_name <proper_email> commit_name <commit_email> # New style map_email() operates the same as before, with the exception that it also will to try to match on a name passed in through the name return buffer. clear_mailmap() is needed to now clear the more complex mailmap structure. Signed-off-by: Marius Storm-Olsen <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'mailmap.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/mailmap.h b/mailmap.h
index ba2ee76..4b2ca3a 100644
--- a/mailmap.h
+++ b/mailmap.h
@@ -2,6 +2,10 @@
#define MAILMAP_H
int read_mailmap(struct string_list *map, char **repo_abbrev);
+void clear_mailmap(struct string_list *map);
int map_email(struct string_list *mailmap, const char *email, char *name, int maxlen);
+int map_user(struct string_list *mailmap,
+ char *email, int maxlen_email, char *name, int maxlen_name);