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

Function print_insert_outcome

atomic-cli/src/commands/insert.rs:658–678  ·  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

656
657/// Print the outcome of a single insert operation.
658fn print_insert_outcome(
659 applied: &[Hash],
660 new_state: atomic_core::types::Merkle,
661 has_conflicts: bool,
662) {
663 println!();
664
665 if applied.is_empty() {
666 output::print_warning("No changes inserted.");
667 return;
668 }
669
670 output::print_success(&format!("Inserted {} change(s)", applied.len()));
671
672 println!(" New state: {}", new_state.to_base32());
673
674 if has_conflicts {
675 println!();
676 output::print_warning("Conflicts detected. Run 'atomic status' to see details.");
677 }
678}
679
680/// Print the outcome of a cross-view insert operation.
681fn print_cross_view_outcome(outcome: &CrossViewInsertOutcome, dry_run: bool) {

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