pub struct CommitGraphChain { /* private fields */ }Expand description
Loaded commit-graph chain (newest layer first, matching commit-graph-chain file order).
Implementations§
Source§impl CommitGraphChain
impl CommitGraphChain
Sourcepub fn top_layer_bloom_settings(&self) -> Option<BloomFilterSettings>
pub fn top_layer_bloom_settings(&self) -> Option<BloomFilterSettings>
Bloom settings from the newest layer, if that layer carries Bloom data.
Sourcepub fn total_commits(&self) -> u32
pub fn total_commits(&self) -> u32
Total commits across all layers (Git num_commits_in_base offset for new layers).
Sourcepub fn layer_paths_oldest_first(&self) -> Vec<PathBuf>
pub fn layer_paths_oldest_first(&self) -> Vec<PathBuf>
Layer file paths from oldest base to newest (reverse of chain file order).
Sourcepub fn try_load(objects_dir: &Path) -> Result<Option<Self>, Error>
pub fn try_load(objects_dir: &Path) -> Result<Option<Self>, Error>
Load from objects/info/commit-graph or objects/info/commit-graphs/commit-graph-chain.
Returns Ok(None) when no commit-graph exists. Corrupt graphs (including invalid GDO2)
return Err.
Sourcepub fn load(objects_dir: &Path) -> Option<Self>
pub fn load(objects_dir: &Path) -> Option<Self>
Like Self::try_load but ignores parse errors (returns None).
Sourcepub fn find_commit(&self, oid: &ObjectId) -> Option<(usize, u32)>
pub fn find_commit(&self, oid: &ObjectId) -> Option<(usize, u32)>
Lexicographic position in the full chain, or None if not in any layer.
Sourcepub fn global_position(&self, oid: &ObjectId) -> Option<u32>
pub fn global_position(&self, oid: &ObjectId) -> Option<u32>
Global commit-graph position (Git graph_pos): base layers first, then newer layers.
Sourcepub fn all_oids_in_order(&self) -> Vec<ObjectId>
pub fn all_oids_in_order(&self) -> Vec<ObjectId>
All commit OIDs in the chain (oldest base first, then newer layers).
Trait Implementations§
Source§impl Clone for CommitGraphChain
impl Clone for CommitGraphChain
Source§fn clone(&self) -> CommitGraphChain
fn clone(&self) -> CommitGraphChain
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more