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

Method display_dry_run

atomic-cli/src/commands/push/command.rs:282–312  ·  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

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