Implements the Git.Command behaviour for git commit.
Supports the -m (message), -a (all), --amend, and --allow-empty flags.
Summary
Types
Functions
Returns the argument list for git commit.
Builds the argument list from the struct fields. The :message field is
required and produces -m <message>. Optional flags are appended when set
to true.
Examples
iex> args = Git.Commands.Commit.args(%Git.Commands.Commit{message: "test", all: true})
iex> args
["commit", "-m", "test", "-a"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, Git.CommitResult.t()} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git commit.
On success (exit code 0), parses the output into a Git.CommitResult
struct. On failure, returns {:error, {stdout, exit_code}}.