Implements the Git.Command behaviour for git reset.
Supports --soft, --mixed (default), and --hard modes against any
git ref (defaults to HEAD).
Summary
Types
Functions
Returns the argument list for git reset.
Builds git reset --<mode> <ref> from the struct fields. The mode defaults
to :mixed and the ref defaults to "HEAD".
Examples
iex> Git.Commands.Reset.args(%Git.Commands.Reset{})
["reset", "--mixed", "HEAD"]
iex> Git.Commands.Reset.args(%Git.Commands.Reset{mode: :soft, ref: "HEAD~1"})
["reset", "--soft", "HEAD~1"]
iex> Git.Commands.Reset.args(%Git.Commands.Reset{mode: :hard})
["reset", "--hard", "HEAD"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, :done} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git reset.
On success (exit code 0), returns {:ok, :done}. On failure, returns
{:error, {stdout, exit_code}}.