Apply a stash to the current working copy: the sidecar bytes are copied back to disk (a pure filesystem operation — no graph interaction; the domain owns the MANIFEST walk).
(&self, repo: &mut Repository, stash: &StashEntry)
| 338 | /// copied back to disk (a pure filesystem operation — no graph |
| 339 | /// interaction; the domain owns the MANIFEST walk). |
| 340 | fn apply_stash(&self, repo: &mut Repository, stash: &StashEntry) -> CliResult<()> { |
| 341 | let (_entry, applied) = repo |
| 342 | .stash_apply(Some(&stash.view_name)) |
| 343 | .map_err(|message| CliError::Internal(anyhow::anyhow!(message)))?; |
| 344 | |
| 345 | if !applied.is_empty() { |
| 346 | print_success(&format!("Applied {} to working copy", stash.reference())); |
| 347 | } else { |
| 348 | print_warning("Stash was already applied or is empty"); |
| 349 | } |
| 350 | Ok(()) |
| 351 | } |
| 352 | |
| 353 | /// Execute stash list. |
| 354 | fn run_list(&self, repo: &Repository) -> CliResult<()> { |
no test coverage detected