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

Function print_insert_outcome

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

512
513/// Print the outcome of a single insert operation.
514fn print_insert_outcome(
515 applied: &[Hash],
516 new_state: atomic_core::types::Merkle,
517 has_conflicts: bool,
518) {
519 println!();
520
521 if applied.is_empty() {
522 output::print_warning("No changes inserted.");
523 return;
524 }
525
526 output::print_success(&format!("Inserted {} change(s)", applied.len()));
527
528 println!(" New state: {}", new_state.to_base32());
529
530 if has_conflicts {
531 println!();
532 output::print_warning("Conflicts detected. Run 'atomic status' to see details.");
533 }
534}
535
536/// Print the outcome of a cross-view insert operation.
537fn 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