Whether the Git index is a clean stage-0 image of the view's projected tree. Only `StagingState.index_manifest` projects to the index (RFC §3.4); any other index state is user work between boundaries. Intent-to-add and sparse entries are tolerated: their intent (not content) is recorded and the joint comparison resolves them like the CB-4B push gate does.
(
repo: &Repository,
repo_root: &Path,
git_repo: &GitRepository,
view: &str,
)
| 968 | /// sparse entries are tolerated: their intent (not content) is recorded and |
| 969 | /// the joint comparison resolves them like the CB-4B push gate does. |
| 970 | fn index_matches_projection( |
| 971 | repo: &Repository, |
| 972 | repo_root: &Path, |
| 973 | git_repo: &GitRepository, |
| 974 | view: &str, |
| 975 | ) -> bool { |
| 976 | let Ok((policy, _filters)) = current_conversion_policy(repo_root, git_repo) else { |
| 977 | return false; |
| 978 | }; |
| 979 | let Ok(project) = repo.project_tree(view, &policy) else { |
| 980 | return false; |
| 981 | }; |
| 982 | let Ok(index) = observe_git_index(repo_root, &policy) else { |
| 983 | return false; |
| 984 | }; |
| 985 | let report = compare_project_to_index(&project, &index); |
| 986 | report.mismatches.is_empty() |
| 987 | } |
| 988 | |
| 989 | /// Project one Atomic view into its Git mirror (CB-8A RFC §8.1/§8.2). |
| 990 | /// |
nothing calls this directly
no test coverage detected