Skip to content

Commit 363fc66

Browse files
committed
Move [Aa]ncestors to under commit module
In preparation of a new module for topological commit walk. The idea is that the current walk will be the "default" hence the 'pub use'.
1 parent 37732fb commit 363fc66

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

gix-traverse/src/commit.rs renamed to gix-traverse/src/commit/ancestors.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub mod ancestors {
100100
use gix_object::{CommitRefIter, FindExt};
101101
use smallvec::SmallVec;
102102

103-
use crate::commit::{collect_parents, Ancestors, Either, Info, ParentIds, Parents, Sorting};
103+
use super::{collect_parents, Ancestors, Either, Info, ParentIds, Parents, Sorting};
104104

105105
/// The error is part of the item returned by the [Ancestors] iterator.
106106
#[derive(Debug, thiserror::Error)]
@@ -455,6 +455,8 @@ pub mod ancestors {
455455
}
456456
}
457457

458+
pub use ancestors::{Error, State};
459+
458460
enum Either<'buf, 'cache> {
459461
CommitRefIter(gix_object::CommitRefIter<'buf>),
460462
CachedCommit(gix_commitgraph::file::Commit<'cache>),

gix-traverse/src/commit/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// Simple ancestors traversal
2+
pub mod ancestors;
3+
pub use ancestors::{Ancestors, Info, ParentIds, Parents, Sorting};

0 commit comments

Comments
 (0)