]> git.ipfire.org Git - thirdparty/git.git/commitdiff
shortlog: rename parse_stdin_ident()
authorJeff King <peff@peff.net>
Sun, 27 Sep 2020 08:40:09 +0000 (04:40 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Sep 2020 19:21:05 +0000 (12:21 -0700)
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>
builtin/shortlog.c

index d2d8103dd3aea3cf5dab89279319b955dae591c7..e6f4faec7c251e89c344da9f683e31ce838164e5 100644 (file)
@@ -98,8 +98,8 @@ static void insert_one_record(struct shortlog *log,
        }
 }
 
-static int parse_stdin_ident(struct shortlog *log,
-                            struct strbuf *out, const char *in)
+static int parse_ident(struct shortlog *log,
+                      struct strbuf *out, const char *in)
 {
        const char *mailbuf, *namebuf;
        size_t namelen, maillen;
@@ -156,7 +156,7 @@ static void read_from_stdin(struct shortlog *log)
                        ; /* discard blanks */
 
                strbuf_reset(&mapped_ident);
-               if (parse_stdin_ident(log, &mapped_ident, v) < 0)
+               if (parse_ident(log, &mapped_ident, v) < 0)
                        continue;
 
                insert_one_record(log, mapped_ident.buf, oneline.buf);