Enum gix_traverse::commit::Sorting
source · pub enum Sorting {
Topological,
ByCommitTimeNewestFirst,
ByCommitTimeNewestFirstCutoffOlderThan {
time_in_seconds_since_epoch: u32,
},
}
Expand description
Specify how to sort commits during traversal.
Variants§
Topological
Commits are sorted as they are mentioned in the commit graph.
ByCommitTimeNewestFirst
Commits are sorted by their commit time in descending order, that is newest first.
The sorting applies to all currently queued commit ids and thus is full.
Performance
This mode benefits greatly from having an object_cache in find()
to avoid having to lookup each commit twice.
ByCommitTimeNewestFirstCutoffOlderThan
Fields
This sorting is similar to ByCommitTimeNewestFirst
, but adds a cutoff to not return commits older than
a given time, stopping the iteration once no younger commits is queued to be traversed.
As the query is usually repeated with different cutoff dates, this search mode benefits greatly from an object cache.