Implements the Git.Command behaviour for git write-tree.
Records the current index as a tree object and returns its SHA. This is the
plumbing counterpart to Git.Commands.CommitTree: write-tree produces the
tree SHA that commit-tree turns into a commit, so together they build a
commit without touching HEAD or the working tree.
Summary
Types
Functions
Returns the argument list for git write-tree.
Examples
iex> Git.Commands.WriteTree.args(%Git.Commands.WriteTree{})
["write-tree"]
iex> Git.Commands.WriteTree.args(%Git.Commands.WriteTree{prefix: "lib"})
["write-tree", "--prefix=lib"]
iex> Git.Commands.WriteTree.args(%Git.Commands.WriteTree{missing_ok: true})
["write-tree", "--missing-ok"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, String.t()} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git write-tree.
On success (exit code 0), returns {:ok, sha} with the trimmed tree SHA.
On failure, returns {:error, {stdout, exit_code}}.