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

Method display_dry_run

atomic-cli/src/commands/pull/command.rs:418–449  ·  view source on GitHub ↗

Display the dry run preview. Shows what changes would be pulled without actually pulling them.

(
        &self,
        remote_name: &str,
        remote_url: &str,
        remote_view: &str,
        to_download: &[PullChange],
    )

Source from the content-addressed store, hash-verified

416 ///
417 /// Shows what changes would be pulled without actually pulling them.
418 fn display_dry_run(
419 &self,
420 remote_name: &str,
421 remote_url: &str,
422 remote_view: &str,
423 to_download: &[PullChange],
424 ) -> CliResult<()> {
425 if to_download.is_empty() {
426 print_success("Already up to date - nothing to pull");
427 return Ok(());
428 }
429
430 println!(
431 "Would pull {} from {} (view: {}):",
432 format_count(to_download.len(), "change"),
433 remote_name,
434 remote_view
435 );
436 print_blank();
437
438 for change in to_download {
439 let hash_str = format_hash(&change.hash, false);
440 let msg = change.message_or_default();
441 let tag_marker = if change.tagged { " [tagged]" } else { "" };
442 println!(" {} {}{}", style_hash(&hash_str), msg, tag_marker);
443 }
444
445 print_blank();
446 print_hint(&format!("Remote URL: {}", remote_url));
447
448 Ok(())
449 }
450
451 /// Display warning about local-only changes.
452 ///

Callers 1

run_asyncMethod · 0.45

Calls 6

print_successFunction · 0.85
print_blankFunction · 0.85
format_hashFunction · 0.85
print_hintFunction · 0.85
is_emptyMethod · 0.45
message_or_defaultMethod · 0.45

Tested by

no test coverage detected