`atomic restore --dry-run` (the listing form) over PreviewRestore — the would-restore / would-untrack split rides the response.
(paths: Vec<String>)
| 4819 | /// `atomic restore --dry-run` (the listing form) over PreviewRestore — |
| 4820 | /// the would-restore / would-untrack split rides the response. |
| 4821 | pub fn restore_preview(paths: Vec<String>) -> CliResult<bool> { |
| 4822 | let Some(session) = Service::open()? else { |
| 4823 | return Ok(false); |
| 4824 | }; |
| 4825 | let partial = !paths.is_empty(); |
| 4826 | let request = pb::PreviewRestoreRequest { |
| 4827 | repository: Some(session.reference.clone()), |
| 4828 | paths, |
| 4829 | force: false, |
| 4830 | content_path: None, |
| 4831 | }; |
| 4832 | let response = session.preview_restore(request)?; |
| 4833 | render_restore_preview(&response, partial); |
| 4834 | Ok(true) |
| 4835 | } |
| 4836 | |
| 4837 | /// `atomic restore --dry-run <file>` (the single-file form) over |
| 4838 | /// PreviewRestore's content arm — the handler reads the file's pristine |
no test coverage detected