`atomic restore --dry-run` (the listing form) over PreviewRestore — the would-restore / would-untrack split rides the response.
(paths: Vec<String>)
| 4779 | /// `atomic restore --dry-run` (the listing form) over PreviewRestore — |
| 4780 | /// the would-restore / would-untrack split rides the response. |
| 4781 | pub fn restore_preview(paths: Vec<String>) -> CliResult<bool> { |
| 4782 | let Some(session) = Service::open()? else { |
| 4783 | return Ok(false); |
| 4784 | }; |
| 4785 | let partial = !paths.is_empty(); |
| 4786 | let request = pb::PreviewRestoreRequest { |
| 4787 | repository: Some(session.reference.clone()), |
| 4788 | paths, |
| 4789 | force: false, |
| 4790 | content_path: None, |
| 4791 | }; |
| 4792 | let response = session.preview_restore(request)?; |
| 4793 | render_restore_preview(&response, partial); |
| 4794 | Ok(true) |
| 4795 | } |
| 4796 | |
| 4797 | /// `atomic restore --dry-run <file>` (the single-file form) over |
| 4798 | /// PreviewRestore's content arm — the handler reads the file's pristine |
no test coverage detected