Keep GitBackend::status() delta-only; use status_full() when hunks are needed
DecisionVerified 6 Oct 2026Holds project: rgit
Decision. The context, the choice, why, and the options that were turned down.
Context#
The TUI must paint a large repository quickly and fill diffs later.
Decision#
GitBackend::status() returns deltas only (lazy). Callers that need hunks call status_full(), which loads them eagerly. The TUI fills diffs asynchronously.
Why#
A delta-only snapshot is fast. Side effect: tests that inspect hunks after status() silently see empty diffs. Change those callers to status_full(). Tests about snapshot speed should assert loaded == false.
Rejected options#
Making status() eager: it slows the first paint on large repositories.
Also found by searching
- rgit tests see empty diffs after status() became lazy
- should GitBackend::status() load hunks eagerly
- status_full vs status in rgit
- TUI paints large repository slowly because of diffs