Implements the Git.Command behaviour for git reflog.
Uses ASCII control characters as delimiters in --format for reliable
parsing of reflog entries into Git.ReflogEntry structs.
Summary
Types
@type t() :: %Git.Commands.Reflog{ all: boolean(), date: String.t() | nil, max_count: non_neg_integer() | nil, ref: String.t() | nil }
Functions
Returns the argument list for git reflog.
Uses --format with ASCII control characters for reliable structured
parsing. The format string produces records separated by RS (\x1e)
with fields separated by US (\x1f).
Examples
iex> args = Git.Commands.Reflog.args(%Git.Commands.Reflog{})
iex> hd(args)
"reflog"
iex> args = Git.Commands.Reflog.args(%Git.Commands.Reflog{max_count: 5})
iex> Enum.member?(args, "-n5")
true
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, [Git.ReflogEntry.t()]} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git reflog.
Returns {:ok, [%Git.ReflogEntry{}]} on success or
{:error, {stdout, exit_code}} on failure.