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

Method display_dry_run

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

Display the dry run preview.

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

Source from the content-addressed store, hash-verified

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