The live tip of `view`'s mapped local ref (hex), or `None`. CB-10A review R6: the ref NAME comes from the PERSISTED published mapping row when one exists (an explicit publish/rename reconciled it), not from a recomputed scope policy that can disagree with the durable row.
(git: &GitRepository, repo: &Repository, view: &str)
| 71 | /// not from a recomputed scope policy that can disagree with the durable |
| 72 | /// row. |
| 73 | pub(crate) fn mapped_ref_tip(git: &GitRepository, repo: &Repository, view: &str) -> Option<String> { |
| 74 | let persisted = repo |
| 75 | .get_ref_mapping(view) |
| 76 | .ok() |
| 77 | .flatten() |
| 78 | .and_then(|mapping| mapping.local_ref.clone()); |
| 79 | let local_ref = match persisted { |
| 80 | Some(local_ref) => local_ref, |
| 81 | None => mapped_ref_for_view(repo, view).ok()??, |
| 82 | }; |
| 83 | observed_tip(git, Some(&local_ref)) |
| 84 | } |
| 85 | |
| 86 | /// Load the persisted mapping for `view`, creating the Synchronized baseline |
| 87 | /// from the live observation when absent (journaled, CB-10A task 1). |
no test coverage detected