Skip to main content

reaches

Function reaches 

Source
pub fn reaches(
    database: &ObjectDatabase,
    layout: &RepoLayout,
    from: &str,
    target: &str,
    budget: usize,
) -> Option<bool>
Expand description

What: Whether target is from or one of its ancestors, within the walk budget; nothing when the walk could not tell. Why: Ahead and not diverged is “the upstream tip is an ancestor of the branch tip”; the walk goes from the branch tip, which reaches the upstream within the commits the branch is ahead by, and stops at the budget on a history that never does.

In TS you’d write (pseudocode):

function reaches(database, from: string, target: string, budget: number): boolean | undefined;