Execute stash list.
(&self, repo: &Repository)
| 610 | |
| 611 | /// Execute stash list. |
| 612 | fn run_list(&self, repo: &Repository) -> CliResult<()> { |
| 613 | let stashes = self.list_stashes(repo)?; |
| 614 | |
| 615 | if stashes.is_empty() { |
| 616 | println!("No stashes found"); |
| 617 | return Ok(()); |
| 618 | } |
| 619 | |
| 620 | for stash in stashes { |
| 621 | let relative_time = format_timestamp_relative(&stash.created_at); |
| 622 | println!( |
| 623 | "{}: On {}: {} ({})", |
| 624 | stash.reference(), |
| 625 | style_view(&stash.source_view), |
| 626 | stash.message, |
| 627 | relative_time |
| 628 | ); |
| 629 | } |
| 630 | |
| 631 | Ok(()) |
| 632 | } |
| 633 | |
| 634 | /// Execute stash show. |
| 635 | fn run_show(&self, repo: &Repository, stash_ref: Option<&str>, patch: bool) -> CliResult<()> { |
no test coverage detected