Implements the Git.Command behaviour for git mv.
Supports moving or renaming a tracked file, with options for force, dry-run, verbose output, and skipping errors.
Summary
Types
Functions
Returns the argument list for git mv.
Builds git mv [options] <source> <destination> from the struct fields.
Examples
iex> Git.Commands.Mv.args(%Git.Commands.Mv{source: "a.txt", destination: "b.txt"})
["mv", "a.txt", "b.txt"]
iex> Git.Commands.Mv.args(%Git.Commands.Mv{source: "a.txt", destination: "b.txt", force: true})
["mv", "-f", "a.txt", "b.txt"]
iex> Git.Commands.Mv.args(%Git.Commands.Mv{source: "a.txt", destination: "b.txt", dry_run: true, verbose: true})
["mv", "-n", "-v", "a.txt", "b.txt"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, :done} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git mv.
On success (exit code 0), returns {:ok, :done}. On failure, returns
{:error, {stdout, exit_code}}.