- if (!strncmp(p, "author ", 7)) {
- p += 7;
- t = strchr(p, '<') - 1;
- ret->author = substr(p, t);
- p = t;
- t = strchr(t, '>') + 1;
- ret->author_email = substr(p, t);
- ret->author_date = atol(++t);
- p = strchr(t, '\n') + 1;
+ if (p && !strncmp(p, "author ", 7)) {
+ p = parse_user(p + 7, &ret->author, &ret->author_email,
+ &ret->author_date);
+ }
+
+ if (p && !strncmp(p, "committer ", 9)) {
+ p = parse_user(p + 9, &ret->committer, &ret->committer_email,
+ &ret->committer_date);