Execute stash list.
(&self, repo: &Repository)
| 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<()> { |
no test coverage detected