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

Method run_list

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

Execute stash list.

(&self, repo: &Repository)

Source from the content-addressed store, hash-verified

352
353 /// Execute stash list.
354 fn run_list(&self, repo: &Repository) -> CliResult<()> {
355 let stashes = self.list_stashes(repo)?;
356
357 if stashes.is_empty() {
358 println!("No stashes found");
359 return Ok(());
360 }
361
362 for stash in stashes {
363 let relative_time = format_timestamp_relative(&stash.created_at);
364 println!(
365 "{}: On {}: {} ({})",
366 stash.reference(),
367 style_view(&stash.source_view),
368 stash.message,
369 relative_time
370 );
371 }
372
373 Ok(())
374 }
375
376 /// Execute stash show.
377 fn run_show(&self, repo: &Repository, stash_ref: Option<&str>, patch: bool) -> CliResult<()> {

Callers 1

runMethod · 0.80

Calls 3

list_stashesMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected