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

Implements the `Git.Command` behaviour for `git status`.

Uses `--porcelain=v1 -b` for machine-readable output with branch information.
The porcelain v1 format and the `-b` flag are always present so the parser in
`Git.Status` keeps working.

# `t`

```elixir
@type t() :: %Git.Commands.Status{
  ignore_submodules: String.t() | nil,
  ignored: boolean(),
  no_renames: boolean(),
  pathspec: [String.t()],
  renames: boolean(),
  untracked_files: untracked_files() | nil
}
```

# `untracked_files`

```elixir
@type untracked_files() :: :no | :normal | :all
```

# `args`

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

Returns the argument list for `git status`.

The base is always `["status", "--porcelain=v1", "-b"]`. Additional flags are
appended based on the struct fields, and any `:pathspec` entries are added last
after a `--` separator.

# `parse_output`

```elixir
@spec parse_output(String.t(), non_neg_integer()) ::
  {:ok, Git.Status.t()} | {:error, {String.t(), non_neg_integer()}}
```

Parses the output of `git status --porcelain=v1 -b`.

On success (exit code 0), returns `{:ok, %Git.Status{}}`.
On failure, returns `{:error, {stdout, exit_code}}`.

---

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