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

Function print_insert_outcome

atomic-cli/src/commands/insert.rs:662–682  ·  view source on GitHub ↗

Print the outcome of a single insert operation.

(
    applied: &[Hash],
    new_state: atomic_core::types::Merkle,
    has_conflicts: bool,
)

Source from the content-addressed store, hash-verified

660
661/// Print the outcome of a single insert operation.
662fn print_insert_outcome(
663 applied: &[Hash],
664 new_state: atomic_core::types::Merkle,
665 has_conflicts: bool,
666) {
667 println!();
668
669 if applied.is_empty() {
670 output::print_warning("No changes inserted.");
671 return;
672 }
673
674 output::print_success(&format!("Inserted {} change(s)", applied.len()));
675
676 println!(" New state: {}", new_state.to_base32());
677
678 if has_conflicts {
679 println!();
680 output::print_warning("Conflicts detected. Run 'atomic conflicts' to see details.");
681 }
682}
683
684/// After materializing the current view, list any conflicted files inline so
685/// the user does not have to run a second command to find them.

Callers 1

run_single_insertFunction · 0.85

Calls 3

print_warningFunction · 0.85
print_successFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected