Skip to main content

label_merges

Function label_merges 

Source
pub fn label_merges(
    history: &[Commit],
    window: usize,
    attribution: &Attribution,
) -> Vec<MergeRecord>
Expand description

Labels every merge in history (newest first) as reverted or not, looking at most window commits forward from each merge.

Distance is measured in positions within history, so the caller is responsible for handing over a sequence where that means something — history uses --first-parent for exactly this reason.

A window of 0 finds nothing; the caller picks it, because the right value is a property of the project’s release cadence, not of this code.