The local-source JSON document, printed from wire-carried views — the same document shape the local body emits (repository_root and the current-view marker resolve client-side, exactly like the local path).
(views: &[JsonView], current_view: Option<String>)
| 773 | /// current-view marker resolve client-side, exactly like the local |
| 774 | /// path). |
| 775 | pub(crate) fn print_local_json(views: &[JsonView], current_view: Option<String>) -> CliResult<()> { |
| 776 | let repo_root = crate::commands::find_repository_root()?; |
| 777 | print_json(&JsonViewList { |
| 778 | schema_version: VIEW_LIST_JSON_SCHEMA_VERSION, |
| 779 | source: "local", |
| 780 | repository_root: Some(repo_root.to_string_lossy().into_owned()), |
| 781 | remote: None, |
| 782 | current_view, |
| 783 | views: views.to_vec(), |
| 784 | }) |
| 785 | } |
| 786 | |
| 787 | // Tests |
| 788 |
no test coverage detected