The mapped local ref for `view` under the §8.1 scope policy. Shared → `refs/heads/ ` (symbolic HEAD), Draft → `refs/atomic/views/ ` (detached HEAD), ephemeral `git/ ` → `None` (no extra ref beyond the original commit).
(repo: &Repository, view: &str)
| 29 | /// `refs/atomic/views/<name>` (detached HEAD), ephemeral `git/<oid>` → |
| 30 | /// `None` (no extra ref beyond the original commit). |
| 31 | pub(crate) fn mapped_ref_for_view(repo: &Repository, view: &str) -> CliResult<Option<String>> { |
| 32 | if is_ephemeral_view_name(view) { |
| 33 | return Ok(None); |
| 34 | } |
| 35 | let scope = repo.get_view_info(view).map_err(CliError::from)?.scope; |
| 36 | Ok(mapped_local_ref(scope, view)) |
| 37 | } |
| 38 | |
| 39 | /// The durable internal view id for `view` (mapping key identity). |
| 40 | fn durable_view_id(repo: &Repository, view: &str) -> CliResult<u64> { |
no test coverage detected