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>
This commit is contained in:
parent
f17b0b99bf
commit
87abb96222
@ -98,7 +98,7 @@ static void insert_one_record(struct shortlog *log,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_stdin_ident(struct shortlog *log,
|
static int parse_ident(struct shortlog *log,
|
||||||
struct strbuf *out, const char *in)
|
struct strbuf *out, const char *in)
|
||||||
{
|
{
|
||||||
const char *mailbuf, *namebuf;
|
const char *mailbuf, *namebuf;
|
||||||
@ -156,7 +156,7 @@ static void read_from_stdin(struct shortlog *log)
|
|||||||
; /* discard blanks */
|
; /* discard blanks */
|
||||||
|
|
||||||
strbuf_reset(&mapped_ident);
|
strbuf_reset(&mapped_ident);
|
||||||
if (parse_stdin_ident(log, &mapped_ident, v) < 0)
|
if (parse_ident(log, &mapped_ident, v) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
insert_one_record(log, mapped_ident.buf, oneline.buf);
|
insert_one_record(log, mapped_ident.buf, oneline.buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user