# `Git.Commands.Mv`
[🔗](https://github.com/joshrotenberg/git_wrapper_ex/blob/main/lib/git/commands/mv.ex#L1)

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.

# `t`

```elixir
@type t() :: %Git.Commands.Mv{
  destination: String.t(),
  dry_run: boolean(),
  force: boolean(),
  skip_errors: boolean(),
  source: String.t(),
  verbose: boolean()
}
```

# `args`

```elixir
@spec args(t()) :: [String.t()]
```

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"]

# `parse_output`

```elixir
@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}}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
