Implements the Git.Command behaviour for git gc.
Cleans up unnecessary files and optimizes the local repository.
Summary
Types
Functions
Returns the argument list for git gc.
Examples
iex> Git.Commands.Gc.args(%Git.Commands.Gc{})
["gc"]
iex> Git.Commands.Gc.args(%Git.Commands.Gc{aggressive: true})
["gc", "--aggressive"]
iex> Git.Commands.Gc.args(%Git.Commands.Gc{auto: true})
["gc", "--auto"]
iex> Git.Commands.Gc.args(%Git.Commands.Gc{prune: "now"})
["gc", "--prune=now"]
iex> Git.Commands.Gc.args(%Git.Commands.Gc{no_prune: true})
["gc", "--no-prune"]
iex> Git.Commands.Gc.args(%Git.Commands.Gc{quiet: true, force: true})
["gc", "--quiet", "--force"]
iex> Git.Commands.Gc.args(%Git.Commands.Gc{keep_largest_pack: true})
["gc", "--keep-largest-pack"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, :done} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git gc.
On success (exit code 0), returns {:ok, :done}. On failure, returns
{:error, {stdout, exit_code}}.