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,
)
| 953 | /// sparse entries are tolerated: their intent (not content) is recorded and |
| 954 | /// the joint comparison resolves them like the CB-4B push gate does. |
| 955 | fn index_matches_projection( |
| 956 | repo: &Repository, |
| 957 | repo_root: &Path, |
| 958 | git_repo: &GitRepository, |
| 959 | view: &str, |
| 960 | ) -> bool { |
| 961 | let Ok((policy, _filters)) = current_conversion_policy(repo_root, git_repo) else { |
| 962 | return false; |
| 963 | }; |
| 964 | let Ok(project) = repo.project_tree(view, &policy) else { |
| 965 | return false; |
| 966 | }; |
| 967 | let Ok(index) = observe_git_index(repo_root, &policy) else { |
| 968 | return false; |
| 969 | }; |
| 970 | let report = compare_project_to_index(&project, &index); |
| 971 | report.mismatches.is_empty() |
| 972 | } |
| 973 | |
| 974 | /// Project one Atomic view into its Git mirror (CB-8A RFC §8.1/§8.2). |
| 975 | /// |
nothing calls this directly
no test coverage detected