Skip to main content

select

Function select 

Source
pub fn select(
    newest_first: &[String],
    annotated: &BTreeSet<String>,
    window: usize,
) -> Vec<String>
Expand description

Choose the commits to walk: from the head back to the window-th recorded commit, returned oldest first.

The window counts recorded commits, not commits. A push of several commits records only its tip, so a window of twenty commits could hold two points, and whether it held enough would depend on how people happened to push.

The head is always included, recorded or not — “the head has nothing recorded” is itself something the report has to say. Unrecorded commits older than the oldest recorded one are dropped: they belong to no range.