# `Git.ShortlogEntry`
[🔗](https://github.com/joshrotenberg/git_wrapper_ex/blob/main/lib/git/shortlog_entry.ex#L1)

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).

# `t`

```elixir
@type t() :: %Git.ShortlogEntry{
  author: String.t(),
  commits: [String.t()],
  count: non_neg_integer(),
  email: String.t() | nil
}
```

# `parse_full`

```elixir
@spec parse_full(String.t()) :: [t()]
```

Parses full (non-summary) shortlog output into entries with commit lists.

# `parse_summary`

```elixir
@spec parse_summary(String.t()) :: [t()]
```

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 2

## Examples

    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("")
    []

---

*Consult [api-reference.md](api-reference.md) for complete listing*
