Implements the Git.Command behaviour for git init.
Supports initializing a new repository at an optional path, with an optional
--bare flag for creating a bare repository.
Summary
Types
Functions
Returns the argument list for git init.
When :bare is true, passes --bare. When :path is set, appends it
as the final argument.
Examples
iex> Git.Commands.Init.args(%Git.Commands.Init{})
["init"]
iex> Git.Commands.Init.args(%Git.Commands.Init{bare: true})
["init", "--bare"]
iex> Git.Commands.Init.args(%Git.Commands.Init{path: "/tmp/repo"})
["init", "/tmp/repo"]
iex> Git.Commands.Init.args(%Git.Commands.Init{bare: true, path: "/tmp/repo.git"})
["init", "--bare", "/tmp/repo.git"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, :done} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git init.
On success (exit code 0), returns {:ok, :done}. On failure, returns
{:error, {stdout, exit_code}}.