Skip to main content

Module git

Module git 

Source
Expand description

Git introspection data shapes.

Type-only - branch resolution + diff scanning live in forge_agent::env::git_diff. GitBranch is the wire shape re-used by both the agent-side snapshot and a view’s render.

Re-exports§

use serde::Deserialize; 🔒
use serde::Deserialize; 🔒
use serde::Serialize; 🔒
use serde::Serialize; 🔒

Structs§

GitCommit
One commit of a branch’s chain ahead of its default branch, as the chain draws it: the short sha, the subject line, the files the commit itself changed - the same shape a layer’s stats take, bounded the same way - and when it was committed, unix seconds, so a reader can tell the newest from the oldest without counting positions.
GitIssueRef
Issue closed by an open PR (parsed from closingIssuesReferences on the GraphQL response, which is more reliable than scanning the PR body for Closes #N). Surfaces in the Inspector pane’s GIT section as part of the PR #N → closes #M #K row.
GitPrInfo
Open pull request associated with the current branch. Populated by the git-diff scanner via gh pr list --head <branch>; surfaces in the Inspector pane’s GIT section as the PR #N row.

Enums§

FileStatus
How git classified one file’s change.
GitBranch
Branch resolution states emitted by the git-diff scanner.