Builds file-tree git badge maps from already-fetched repo status entries.
This module never shells out to git. Minga.Git.Repo owns fetching and caching repo status; the file tree consumes those cached entries and converts them into %{absolute_path => status_atom} maps. Directory entries inherit the most severe descendant status so collapsed directories still show useful badges.
Summary
Functions
Builds file-tree git status from an already-fetched git status event.
Returns the severity rank for a status (higher = more urgent). Used for directory propagation: the "worst" child status wins.
Returns the display symbol for a git status.
Types
@type file_status() ::
:staged | :modified | :untracked | :conflict | :renamed | :deleted
Git status for a single file.
@type status_map() :: %{required(String.t()) => file_status()}
Status map keyed by absolute file path.
Functions
@spec from_entries([Minga.Git.status_entry()], String.t(), String.t()) :: status_map()
Builds file-tree git status from an already-fetched git status event.
This lets event handlers refresh badges without shelling out during render or recomputing status that Minga.Git.Repo already fetched.
@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.
@spec symbol(file_status()) :: String.t()
Returns the display symbol for a git status.