Implements the Git.Command behaviour for git add.
Supports adding specific files or all changes with --all.
Summary
Types
Functions
Returns the argument list for git add.
When :all is true, passes --all. Otherwise, appends the list of
file paths to the argument list.
Examples
iex> Git.Commands.Add.args(%Git.Commands.Add{all: true})
["add", "--all"]
iex> Git.Commands.Add.args(%Git.Commands.Add{files: ["foo.txt", "bar.txt"]})
["add", "foo.txt", "bar.txt"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, :done} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git add.
On success (exit code 0), returns {:ok, :done}. On failure, returns
{:error, {stdout, exit_code}}.