MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / shallow_boundary_oids

Function shallow_boundary_oids

atomic-cli/src/commands/git/parallel.rs:1841–1852  ·  view source on GitHub ↗

The Git shallow boundary set: hex OIDs listed in ` /shallow`.

(git: &GitRepository)

Source from the content-addressed store, hash-verified

1839
1840/// The Git shallow boundary set: hex OIDs listed in `<gitdir>/shallow`.
1841pub(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

Calls 4

pathMethod · 0.45
collectMethod · 0.45
linesMethod · 0.45
is_emptyMethod · 0.45