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

Function format_remote_state

atomic-cli/src/commands/push/helpers.rs:508–515  ·  view source on GitHub ↗

Format the remote state for display.

(state: &StateResponse, entries: &[ChangelistEntry])

Source from the content-addressed store, hash-verified

506
507/// Format the remote state for display.
508fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String {
509 if let Some(merkle_str) = state.merkle() {
510 let short_state = &merkle_str[..12.min(merkle_str.len())];
511 format!("{} ({} changes)", short_state, entries.len())
512 } else {
513 "(empty)".to_string()
514 }
515}
516
517/// Format a count with singular/plural suffix.
518///

Callers 1

display_state_comparisonFunction · 0.70

Calls 2

merkleMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected