MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / display_head

Function display_head

atomic-cli/src/commands/git/guard.rs:420–433  ·  view source on GitHub ↗
(head: &GitHeadEvidence)

Source from the content-addressed store, hash-verified

418}
419
420fn display_head(head: &GitHeadEvidence) -> String {
421 match head {
422 GitHeadEvidence::Attached { symref, oid } => format!("attached {symref} at {oid}"),
423 GitHeadEvidence::Detached { oid } => format!("detached at {oid}"),
424 GitHeadEvidence::Unborn { symref } => format!("unborn {symref}"),
425 GitHeadEvidence::MissingTarget { symref } => format!("missing target {symref}"),
426 GitHeadEvidence::Unknown { oid } => format!(
427 "unknown{}",
428 oid.as_ref()
429 .map(|oid| format!(" at {oid}"))
430 .unwrap_or_default()
431 ),
432 }
433}
434
435#[derive(Clone, Debug, Eq, PartialEq)]
436pub(crate) enum GuardOutcome {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected