Expand description
Commit graph traversal utilities.
Provides a reusable BFS-based commit walker that correctly handles merge commits with multiple parents. This module exists to prevent the common bug of only following the first parent.
§Example
ⓘ
use void_core::ops::traversal::{CommitWalker, WalkOptions};
let walker = CommitWalker::new(&store, &key, WalkOptions::from_head(&void_dir)?)?;
for result in walker.take(100) {
let (cid, commit, reader) = result?;
println!("Commit: {} - {}", cid, commit.message);
}Structs§
- Commit
Walker - BFS-based commit graph walker.
- Walk
Options - Options for commit traversal.
- Walked
Commit - A visited commit with its parsed data.
Enums§
- Walk
Order - Walk order for commit traversal.
Functions§
- walk_
all_ refs - Convenience function to walk all commits from all refs.
- walk_
from_ head - Convenience function to walk commits from HEAD.
- walk_
topological - Walk commits in topological order (root-to-head / oldest first).