# `Minga.Project.FileTree.GitStatus`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/project/file_tree/git_status.ex#L1)

Computes git status for all files under a directory tree.

Runs `git status --porcelain=v1` and parses the output into a map
of `%{absolute_path => status_atom}`. Also propagates status up to
parent directories so collapsed dirs show the "worst" child status.

This module is pure (no GenServer). The caller is responsible for
caching the result and refreshing it on save/git operations.

# `file_status`

```elixir
@type file_status() ::
  :staged | :modified | :untracked | :conflict | :renamed | :deleted
```

Git status for a single file.

# `status_map`

```elixir
@type status_map() :: %{required(String.t()) =&gt; file_status()}
```

Status map keyed by absolute file path.

# `compute`

```elixir
@spec compute(String.t()) :: status_map()
```

Computes git status for all files under `root_path`.

Returns a status map with absolute paths as keys. If the path is not
inside a git repo, returns an empty map. Directory entries are included
with the "worst" status of any descendant.

Runs asynchronously-friendly: no side effects, no process state.

# `severity`

```elixir
@spec severity(file_status()) :: non_neg_integer()
```

Returns the severity rank for a status (higher = more urgent).
Used for directory propagation: the "worst" child status wins.

# `symbol`

```elixir
@spec symbol(file_status()) :: String.t()
```

Returns the display symbol for a git status.

---

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