shortlog: rename parse_stdin_ident()
This function is actually useful for parsing any identity, whether from stdin or not. We'll need it for handling trailers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Sep 27, 2020 at 04:40 UTC
87abb96222b076a1a9aa9c92f799107141feeca4
1 file changed
+3
-3
builtin/shortlog.c
+3
-3
@@ -98,8 +98,8 @@ static void insert_one_record(struct shortlog *log,
98
}
99
}
100
101
-static int parse_stdin_ident(struct shortlog *log,
102
- struct strbuf *out, const char *in)
101
+static int parse_ident(struct shortlog *log,
102
+ struct strbuf *out, const char *in)
103
{
104
const char *mailbuf, *namebuf;
105
size_t namelen, maillen;
@@ -156,7 +156,7 @@ static void read_from_stdin(struct shortlog *log)
156
; /* discard blanks */
157
158
strbuf_reset(&mapped_ident);
159
- if (parse_stdin_ident(log, &mapped_ident, v) < 0)
159
+ if (parse_ident(log, &mapped_ident, v) < 0)
160
continue;
161
162
insert_one_record(log, mapped_ident.buf, oneline.buf);