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,
)
| 1642 | /// selected, so an ephemeral view built from one commit's closure gains |
| 1643 | /// only the private bookkeeping, never later content. |
| 1644 | pub(super) fn atomic_private_members( |
| 1645 | repo: &Repository, |
| 1646 | view: &str, |
| 1647 | ) -> CliResult<Vec<atomic_core::types::Hash>> { |
| 1648 | let mut members = Vec::new(); |
| 1649 | for (hash, origin) in repo |
| 1650 | .full_chain_member_origins(view) |
| 1651 | .map_err(CliError::from)? |
| 1652 | { |
| 1653 | if origin.is_some() { |
| 1654 | continue; |
| 1655 | } |
| 1656 | let change = repo.load_change(&hash).map_err(CliError::from)?; |
| 1657 | let mut paths: Vec<String> = change |
| 1658 | .file_ops() |
| 1659 | .iter() |
| 1660 | .map(|ops| ops.path().to_string()) |
| 1661 | .collect(); |
| 1662 | for hunk in change.hunks() { |
| 1663 | if let atomic_core::change::GraphOp::FileAdd { path, .. } = hunk { |
| 1664 | paths.push(path.clone()); |
| 1665 | } |
| 1666 | } |
| 1667 | if !paths.is_empty() |
| 1668 | && paths |
| 1669 | .iter() |
| 1670 | .all(|path| atomic_repository::atomic_private_path(path.as_bytes())) |
| 1671 | { |
| 1672 | members.push(hash); |
| 1673 | } |
| 1674 | } |
| 1675 | Ok(members) |
| 1676 | } |
| 1677 | |
| 1678 | /// Refuse to project `target` over a branch tip the view has never |
| 1679 | /// interpreted. `find_or_create_target_commit` appends a projection commit |
no test coverage detected