Parsed representation of a git shortlog entry.
Contains the author name, optional email, commit count, and list of
commit subjects (empty when summary: true is used).
Summary
Functions
Parses full (non-summary) shortlog output into entries with commit lists.
Parses the output of git shortlog into a list of Git.ShortlogEntry structs.
Types
@type t() :: %Git.ShortlogEntry{ author: String.t(), commits: [String.t()], count: non_neg_integer(), email: String.t() | nil }
Functions
Parses full (non-summary) shortlog output into entries with commit lists.
Parses the output of git shortlog into a list of Git.ShortlogEntry structs.
Handles both summary mode (-s) and full mode output.
Summary mode lines have the form:
count\tAuthor Name
count\tAuthor Name <email>Full mode output has the form:
Author Name (count):
commit subject 1
commit subject 2Examples
iex> Git.ShortlogEntry.parse_summary(" 3\tAlice\n 1\tBob\n")
[
%Git.ShortlogEntry{author: "Alice", email: nil, count: 3, commits: []},
%Git.ShortlogEntry{author: "Bob", email: nil, count: 1, commits: []}
]
iex> Git.ShortlogEntry.parse_summary("")
[]