(&self, formatter: &mut fmt::Formatter<'_>)
| 421 | |
| 422 | impl fmt::Display for Unanchored { |
| 423 | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 424 | match self { |
| 425 | Self::NoGit => write!(formatter, "no Git repository is present"), |
| 426 | Self::BareRepository => write!(formatter, "Git repository has no working tree"), |
| 427 | Self::DetachedHead { oid } => write!(formatter, "Git HEAD is detached at {oid}"), |
| 428 | Self::UnbornHead { symref } => write!(formatter, "Git HEAD is unborn at {symref}"), |
| 429 | Self::MissingHeadTarget { symref } => { |
| 430 | write!(formatter, "Git HEAD target {symref} is missing") |
| 431 | } |
| 432 | Self::UnsupportedHeadSymref { symref } => { |
| 433 | write!(formatter, "Git HEAD symref {symref} is not a local branch") |
| 434 | } |
| 435 | Self::IndexLocked { path } => { |
| 436 | write!(formatter, "Git index lock is present at {}", path.display()) |
| 437 | } |
| 438 | Self::RefLocked { paths } => { |
| 439 | write!( |
| 440 | formatter, |
| 441 | "Git ref locks are present at {} path(s)", |
| 442 | paths.len() |
| 443 | ) |
| 444 | } |
| 445 | Self::OperationInProgress { |
| 446 | repository_state, |
| 447 | markers, |
| 448 | } => write!( |
| 449 | formatter, |
| 450 | "Git operation is in progress (state {repository_state}, {} marker(s))", |
| 451 | markers.len() |
| 452 | ), |
| 453 | Self::NonZeroIndexStages { entries } => write!( |
| 454 | formatter, |
| 455 | "Git index contains {} stage 1-3 entr{}", |
| 456 | entries.len(), |
| 457 | if entries.len() == 1 { "y" } else { "ies" } |
| 458 | ), |
| 459 | Self::IndexTreeUnavailable { reason } => { |
| 460 | write!(formatter, "Git index tree is unavailable: {reason:?}") |
| 461 | } |
| 462 | Self::IndexDiffersFromHead { .. } => { |
| 463 | write!(formatter, "Git index stage 0 differs from the HEAD tree") |
| 464 | } |
| 465 | Self::AtomicViewMismatch { |
| 466 | atomic_view, |
| 467 | git_branch, |
| 468 | } => write!( |
| 469 | formatter, |
| 470 | "Atomic view '{atomic_view}' does not match Git branch '{git_branch}'" |
| 471 | ), |
| 472 | Self::CheckpointDrift { fields } => { |
| 473 | write!(formatter, "shim checkpoint drift: {}", fields.join(", ")) |
| 474 | } |
| 475 | Self::ManifestMismatch { detail } => { |
| 476 | write!(formatter, "Atomic/Git manifests differ: {detail}") |
| 477 | } |
| 478 | Self::ManifestEquivalenceNotComputed => write!( |
| 479 | formatter, |
| 480 | "Atomic/Git manifest equivalence was not computed in forensic mode" |
nothing calls this directly
no outgoing calls
no test coverage detected