Build the display-only mapping for a workspace view without a persisted row (read-only; `view_id` 0 marks it unpersisted).
(repo: &Repository, view: &str)
| 562 | /// Build the display-only mapping for a workspace view without a persisted |
| 563 | /// row (read-only; `view_id` 0 marks it unpersisted). |
| 564 | fn unpersisted_mapping(repo: &Repository, view: &str) -> CliResult<RefMapping> { |
| 565 | let info = repo.get_view_info(view).map_err(CliError::from)?; |
| 566 | Ok(RefMapping { |
| 567 | version: REF_MAPPING_VERSION, |
| 568 | view_id: 0, |
| 569 | view_name: view.to_string(), |
| 570 | scope: info.scope as u8, |
| 571 | local_ref: if is_ephemeral_view_name(view) { |
| 572 | None |
| 573 | } else { |
| 574 | mapped_local_ref(info.scope, view) |
| 575 | }, |
| 576 | remote: None, |
| 577 | last_observed_local: None, |
| 578 | last_observed_remote: None, |
| 579 | last_exported: None, |
| 580 | last_exported_state: None, |
| 581 | last_observed_atomic: None, |
| 582 | status: RefSyncStatus::Synchronized, |
| 583 | }) |
| 584 | } |
| 585 | |
| 586 | /// `atomic git shim publish <view> --branch <name>`: explicit Draft |
| 587 | /// publication (RFC §8.1, CB-10A AC-2). |
no test coverage detected