Minga.Git.Repo.StatusSnapshot (Minga v0.1.0)

Copy Markdown View Source

Cached git status entries for a tracked repository.

entry_base_path tells consumers which filesystem path the entry paths are relative to. This lets cache-only UI consumers render badges without shelling out to git.

degraded?/degraded_reason flag when the cached entries are incomplete (e.g. git status timed out on a full checkout), so consumers can show a visible "degraded" indicator instead of silently trusting a trimmed list.

Summary

Types

degraded_reason()

@type degraded_reason() :: Minga.Git.Repo.degraded_reason()

t()

@type t() :: %Minga.Git.Repo.StatusSnapshot{
  degraded?: boolean(),
  degraded_reason: degraded_reason() | nil,
  entries: [Minga.Git.StatusEntry.t()],
  entry_base_path: String.t(),
  git_root: String.t()
}

Functions

new(git_root, entry_base_path, entries, degraded? \\ false, degraded_reason \\ nil)

@spec new(
  String.t(),
  String.t(),
  [Minga.Git.StatusEntry.t()],
  boolean(),
  degraded_reason() | nil
) ::
  t()

Builds a cached status snapshot.