The Git shallow boundary set: hex OIDs listed in ` /shallow`.
(git: &GitRepository)
| 1839 | |
| 1840 | /// The Git shallow boundary set: hex OIDs listed in `<gitdir>/shallow`. |
| 1841 | pub(crate) fn shallow_boundary_oids(git: &GitRepository) -> HashSet<String> { |
| 1842 | let path = git.path().join("shallow"); |
| 1843 | let Ok(content) = fs::read_to_string(&path) else { |
| 1844 | return HashSet::new(); |
| 1845 | }; |
| 1846 | content |
| 1847 | .lines() |
| 1848 | .map(str::trim) |
| 1849 | .filter(|line| !line.is_empty()) |
| 1850 | .map(str::to_owned) |
| 1851 | .collect() |
| 1852 | } |
| 1853 | |
| 1854 | /// Fail closed when any collected commit, its parents, or its tree cannot be |
| 1855 | /// resolved from the Git object database (CB-9A §7: missing-object boundaries |