Execute stash show.
(&self, repo: &Repository, stash_ref: Option<&str>, patch: bool)
| 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<()> { |
no test coverage detected