Struct git_repository::revision::walk::Platform
source · pub struct Platform<'repo> { /* private fields */ }
Expand description
A platform to traverse the revision graph by adding starting points as well as points which shouldn’t be crossed,
returned by Repository::rev_walk()
.
Implementations§
source§impl<'repo> Platform<'repo>
impl<'repo> Platform<'repo>
Create-time builder methods
sourcepub fn sorting(self, sorting: Sorting) -> Self
pub fn sorting(self, sorting: Sorting) -> Self
Set the sort mode for commits to the given value. The default is to order by topology.
sourcepub fn first_parent_only(self) -> Self
pub fn first_parent_only(self) -> Self
Only traverse the first parent of the commit graph.
source§impl<'repo> Platform<'repo>
impl<'repo> Platform<'repo>
Produce the iterator
sourcepub fn all(self) -> Result<Walk<'repo>, Error>
pub fn all(self) -> Result<Walk<'repo>, Error>
Return an iterator to traverse all commits reachable as configured by the Platform.
Performance
It’s highly recommended to set an object cache
on the parent repo
to greatly speed up performance if the returned id is supposed to be looked up right after.