Expand description
Git diff snapshot types.
Type-only - the scanner that produces these lives in
forge_agent::env::git_diff::scan. The four shapes cross every
forge-* crate boundary (agent produces, workspace mediates, a view
renders), so they live in primitives per the crate placement guide.
Sibling git types (GitBranch, GitPrInfo, GitIssueRef) live in
crate::git.
Re-exports§
use crate::git::GitBranch;🔒use crate::git::GitIssueRef;🔒use crate::git::GitPrInfo;🔒use serde::Deserialize;🔒use serde::Deserialize;🔒use serde::Serialize;🔒use serde::Serialize;🔒
Structs§
- GitBranch
Ahead - Layer 2 payload: how far the branch is ahead of the default branch, alongside the corresponding numstat.
- GitDiff
File - One file’s diff stats.
added/removedare git’s--numstatline counts; binary files (which numstat reports as-) are dropped by the parser rather than appearing here. - GitDiff
Snapshot - Snapshot of one project’s git state, suitable for rendering in the Inspector pane’s GIT section. Branch info is folded in here so a single polled scan covers everything the renderer needs.
- GitDiff
Stats - Per-file numstat plus aggregate totals for one diff layer.
Shared between
GitDiffSnapshot::worktree(layer 1, HEAD vs workdir) andGitBranchAhead::stats(layer 2, default vs branch tip). - GitWork
View - The tree behind a git row’s depth, bundled: what a hover over the row draws beyond the branch and the count.
Enums§
- Base
State - How current the base a drawn branch diff was measured against is.
- Layer
State - Per-layer scan state. Replaces the earlier parallel-bool encoding
(
Option<T>paired with a*_scan_ok: bool) so the three legal states are unrepresentable as illegal combinations. - PrRefresh
- Whether a scan may reach the network for its PR block.
- Repo
Gate - Three-state classification of the scan’s repo gate. Replaces the
earlier
in_repo+scanner_okbool pair so the illegal “in a repo but the scanner failed” combination is unrepresentable.