|
| 1 | +#include "git2/mailmap.h" |
| 2 | + |
| 3 | +typedef struct mailmap_entry { |
| 4 | + const char *real_name; |
| 5 | + const char *real_email; |
| 6 | + const char *replace_name; |
| 7 | + const char *replace_email; |
| 8 | +} mailmap_entry; |
| 9 | + |
| 10 | +static const char string_mailmap[] = |
| 11 | + "# Simple Comment line\n" |
| 12 | + "<cto@company.xx> <cto@coompany.xx>\n" |
| 13 | + "Some Dude <some@dude.xx> nick1 <bugs@company.xx>\n" |
| 14 | + "Other Author <other@author.xx> nick2 <bugs@company.xx>\n" |
| 15 | + "Other Author <other@author.xx> <nick2@company.xx>\n" |
| 16 | + "Phil Hill <phil@company.xx> # Comment at end of line\n" |
| 17 | + "<joseph@company.xx> Joseph <bugs@company.xx>\n" |
| 18 | + "Santa Claus <santa.claus@northpole.xx> <me@company.xx>\n" |
| 19 | + "Untracked <untracked@company.xx>"; |
| 20 | + |
| 21 | +static const mailmap_entry entries[] = { |
| 22 | + { NULL, "cto@company.xx", NULL, "cto@coompany.xx" }, |
| 23 | + { "Some Dude", "some@dude.xx", "nick1", "bugs@company.xx" }, |
| 24 | + { "Other Author", "other@author.xx", "nick2", "bugs@company.xx" }, |
| 25 | + { "Other Author", "other@author.xx", NULL, "nick2@company.xx" }, |
| 26 | + { "Phil Hill", NULL, NULL, "phil@company.xx" }, |
| 27 | + { NULL, "joseph@company.xx", "Joseph", "bugs@company.xx" }, |
| 28 | + { "Santa Claus", "santa.claus@northpole.xx", NULL, "me@company.xx" }, |
| 29 | + /* This entry isn't in the bare repository */ |
| 30 | + { "Untracked", NULL, NULL, "untracked@company.xx" } |
| 31 | +}; |
| 32 | + |
| 33 | +static const mailmap_entry resolved[] = { |
| 34 | + { "Brad", "cto@company.xx", "Brad", "cto@coompany.xx" }, |
| 35 | + { "Brad L", "cto@company.xx", "Brad L", "cto@coompany.xx" }, |
| 36 | + { "Some Dude", "some@dude.xx", "nick1", "bugs@company.xx" }, |
| 37 | + { "Other Author", "other@author.xx", "nick2", "bugs@company.xx" }, |
| 38 | + { "nick3", "bugs@company.xx", "nick3", "bugs@company.xx" }, |
| 39 | + { "Other Author", "other@author.xx", "Some Garbage", "nick2@company.xx" }, |
| 40 | + { "Phil Hill", "phil@company.xx", "unknown", "phil@company.xx" }, |
| 41 | + { "Joseph", "joseph@company.xx", "Joseph", "bugs@company.xx" }, |
| 42 | + { "Santa Claus", "santa.claus@northpole.xx", "Clause", "me@company.xx" }, |
| 43 | + { "Charles", "charles@charles.xx", "Charles", "charles@charles.xx" } |
| 44 | +}; |
| 45 | + |
| 46 | +static const mailmap_entry resolved_bare[] = { |
| 47 | + { "xx", "untracked@company.xx", "xx", "untracked@company.xx" } |
| 48 | +}; |
| 49 | + |
| 50 | +static const mailmap_entry resolved_untracked[] = { |
| 51 | + { "Untracked", "untracked@company.xx", "xx", "untracked@company.xx" } |
| 52 | +}; |
0 commit comments