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

Method run_show

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

Execute stash show.

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

Source from the content-addressed store, hash-verified

633
634 /// Execute stash show.
635 fn run_show(&self, repo: &Repository, stash_ref: Option<&str>, patch: bool) -> CliResult<()> {
636 let stash = self.parse_stash_ref(repo, stash_ref)?;
637
638 println!("{}", stash.reference());
639 println!(" Source view: {}", style_view(&stash.source_view));
640 println!(" Message: {}", stash.message);
641 println!(
642 " Created: {}",
643 format_timestamp_relative(&stash.created_at)
644 );
645
646 // Get view info
647 let info = repo
648 .get_view_info(&stash.view_name)
649 .map_err(CliError::Repository)?;
650
651 println!(" Changes: {}", info.change_count);
652
653 if patch {
654 // TODO: Implement full diff output
655 print_blank();
656 print_hint("Full diff output not yet implemented");
657 }
658
659 Ok(())
660 }
661
662 /// Execute stash drop.
663 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