pub struct RepoStatus {
pub branch: String,
pub committed: bool,
pub all_commits_pushed: bool,
pub branches_have_remote: bool,
pub not_behind_remote: bool,
pub correct_branch: bool,
pub branch_verdict: BranchVerdict,
pub base: ResolvedBase,
pub rule: BranchRule,
pub problem: Option<String>,
}Expand description
Outcome of all five checks for one repo.
Fields§
§branch: String§committed: bool§all_commits_pushed: bool§branches_have_remote: bool§not_behind_remote: bool§correct_branch: bool§branch_verdict: BranchVerdictThe detailed correct-branch verdict (drives correct_branch + the -vv
R5 reason line).
base: ResolvedBaseThe base branch used for the correct-branch check + how it was resolved.
When base.name is None (unresolved), correct_branch is forced false.
rule: BranchRuleWhich correct-branch rule applied (gkit.solo selects it). Surfaced in
verbose only when BranchRule::Solo (the non-default rule).
problem: Option<String>Set when the path couldn’t be checked at all (missing dir / not a git
repo). When present, the gate FAILS and problem is shown in place of the
checks — otherwise a non-repo would pass every check vacuously (empty git
output reads as “nothing pending”).
Implementations§
Source§impl RepoStatus
impl RepoStatus
Sourcepub fn unusable(reason: impl Into<String>) -> Self
pub fn unusable(reason: impl Into<String>) -> Self
A path that couldn’t be checked (missing dir / not a git repo). Fails the
gate; reason is rendered in place of the per-check results.
Sourcepub fn rule_passed(&self, rule: RuleId) -> bool
pub fn rule_passed(&self, rule: RuleId) -> bool
Pass/fail for a single rule (used by the -vv per-rule lines).
Sourcepub fn failure_reason(&self, rule: RuleId) -> Option<String>
pub fn failure_reason(&self, rule: RuleId) -> Option<String>
The reason a rule failed, or None if it passed — the text shown after
R<n> reason at logoff -vv.
Trait Implementations§
Source§impl Clone for RepoStatus
impl Clone for RepoStatus
Source§fn clone(&self) -> RepoStatus
fn clone(&self) -> RepoStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more