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

Implements the `Git.Command` behaviour for `git count-objects`.

Always runs in verbose mode (`-v`) so the full set of statistics is
available for parsing into a `Git.CountObjects` struct.

# `t`

```elixir
@type t() :: %Git.Commands.CountObjects{}
```

# `args`

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

Returns the argument list for `git count-objects -v`.

## Examples

    iex> Git.Commands.CountObjects.args(%Git.Commands.CountObjects{})
    ["count-objects", "-v"]

# `parse_output`

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

Parses the output of `git count-objects -v` into a `Git.CountObjects` struct.

On a non-zero exit code, returns `{:error, {stdout, exit_code}}`.

---

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