Members of `view` that no Git commit introduced and that touch only Atomic-private paths (`.atomic*`): the repository initialization change tracking `.atomicignore`. Native records of project files are never selected, so an ephemeral view built from one commit's closure gains only the private bookkeeping, never later content.
(
repo: &Repository,
view: &str,
)
| 1686 | /// selected, so an ephemeral view built from one commit's closure gains |
| 1687 | /// only the private bookkeeping, never later content. |
| 1688 | pub(super) fn atomic_private_members( |
| 1689 | repo: &Repository, |
| 1690 | view: &str, |
| 1691 | ) -> CliResult<Vec<atomic_core::types::Hash>> { |
| 1692 | let mut members = Vec::new(); |
| 1693 | for (hash, origin) in repo |
| 1694 | .full_chain_member_origins(view) |
| 1695 | .map_err(CliError::from)? |
| 1696 | { |
| 1697 | if origin.is_some() { |
| 1698 | continue; |
| 1699 | } |
| 1700 | let change = repo.load_change(&hash).map_err(CliError::from)?; |
| 1701 | let mut paths: Vec<String> = change |
| 1702 | .file_ops() |
| 1703 | .iter() |
| 1704 | .map(|ops| ops.path().to_string()) |
| 1705 | .collect(); |
| 1706 | for hunk in change.hunks() { |
| 1707 | if let atomic_core::change::GraphOp::FileAdd { path, .. } = hunk { |
| 1708 | paths.push(path.clone()); |
| 1709 | } |
| 1710 | } |
| 1711 | if !paths.is_empty() |
| 1712 | && paths |
| 1713 | .iter() |
| 1714 | .all(|path| atomic_repository::atomic_private_path(path.as_bytes())) |
| 1715 | { |
| 1716 | members.push(hash); |
| 1717 | } |
| 1718 | } |
| 1719 | Ok(members) |
| 1720 | } |
| 1721 | |
| 1722 | /// Refuse to project `target` over a branch tip the view has never |
| 1723 | /// interpreted. `find_or_create_target_commit` appends a projection commit |
no test coverage detected