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

Function format_remote_state

atomic-cli/tests/fixtures/helpers_c6.rs:473–480  ·  view source on GitHub ↗

Format the remote state for display.

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

Source from the content-addressed store, hash-verified

471
472/// Format the remote state for display.
473fn format_remote_state(state: &StateResponse, entries: &[ChangelistEntry]) -> String {
474 if let Some(merkle_str) = state.merkle() {
475 let short_state = &merkle_str[..12.min(merkle_str.len())];
476 format!("{} ({} changes)", short_state, entries.len())
477 } else {
478 "(empty)".to_string()
479 }
480}
481
482/// Format a count with singular/plural suffix.
483///

Callers 1

display_state_comparisonFunction · 0.70

Calls 2

merkleMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected