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

Method run_show

atomic-cli/src/commands/stash.rs:377–402  ·  view source on GitHub ↗

Execute stash show.

(&self, repo: &Repository, stash_ref: Option<&str>, patch: bool)

Source from the content-addressed store, hash-verified

375
376 /// Execute stash show.
377 fn run_show(&self, repo: &Repository, stash_ref: Option<&str>, patch: bool) -> CliResult<()> {
378 let stash = self.parse_stash_ref(repo, stash_ref)?;
379
380 println!("{}", stash.reference());
381 println!(" Source view: {}", style_view(&stash.source_view));
382 println!(" Message: {}", stash.message);
383 println!(
384 " Created: {}",
385 format_timestamp_relative(&stash.created_at)
386 );
387
388 // Get view info
389 let info = repo
390 .get_view_info(&stash.view_name)
391 .map_err(CliError::Repository)?;
392
393 println!(" Changes: {}", info.change_count);
394
395 if patch {
396 // TODO: Implement full diff output
397 print_blank();
398 print_hint("Full diff output not yet implemented");
399 }
400
401 Ok(())
402 }
403
404 /// Execute stash drop.
405 fn run_drop(&self, repo: &mut Repository, stash_ref: Option<&str>) -> CliResult<()> {

Callers 1

runMethod · 0.80

Calls 4

print_blankFunction · 0.85
print_hintFunction · 0.85
parse_stash_refMethod · 0.80
get_view_infoMethod · 0.80

Tested by

no test coverage detected