# `Git.Commands.Log`
[🔗](https://github.com/joshrotenberg/git_wrapper_ex/blob/main/lib/git/commands/log.ex#L1)

Implements the `Git.Command` behaviour for `git log`.

Builds arguments for the git log subcommand and parses the output
into a list of `Git.Commit` structs.

# `t`

```elixir
@type t() :: %Git.Commands.Log{
  all_match: boolean(),
  author: String.t() | nil,
  grep: String.t() | nil,
  max_count: non_neg_integer() | nil,
  path: String.t() | nil,
  pickaxe: String.t() | nil,
  pickaxe_regex: String.t() | nil,
  range: String.t() | nil,
  since: String.t() | nil,
  until_date: String.t() | nil
}
```

# `args`

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

Builds the argument list for `git log`.

Uses ASCII control characters as delimiters to reliably parse output
even when commit messages contain newlines or special characters.

# `parse_output`

```elixir
@spec parse_output(String.t(), non_neg_integer()) ::
  {:ok, [Git.Commit.t()]} | {:error, {String.t(), non_neg_integer()}}
```

Parses the stdout and exit code from `git log` into a result.

Returns `{:ok, [%Git.Commit{}]}` on success or
`{:error, {stdout, exit_code}}` on failure.

---

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