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

Method display_dry_run

atomic-cli/src/commands/push/command.rs:281–311  ·  view source on GitHub ↗

Display the dry run preview.

(
        &self,
        remote_name: &str,
        remote_url: &str,
        remote_view: &str,
        to_upload: &[PushChange],
    )

Source from the content-addressed store, hash-verified

279
280 /// Display the dry run preview.
281 fn display_dry_run(
282 &self,
283 remote_name: &str,
284 remote_url: &str,
285 remote_view: &str,
286 to_upload: &[PushChange],
287 ) -> CliResult<()> {
288 if to_upload.is_empty() {
289 print_success("Already up to date - nothing to push");
290 return Ok(());
291 }
292
293 println!(
294 "Would push {} to {} (view: {}):",
295 format_count(to_upload.len(), "change"),
296 remote_name,
297 remote_view
298 );
299 print_blank();
300
301 for change in to_upload {
302 let hash_str = format_hash(&change.hash, false);
303 let msg = change.message_or_default();
304 println!(" {} {}", style_hash(&hash_str), msg);
305 }
306
307 print_blank();
308 print_hint(&format!("Remote URL: {}", remote_url));
309
310 Ok(())
311 }
312
313 /// Async implementation of the push command.
314 async fn run_async(&self) -> CliResult<()> {

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