Skip to main content

cutoff

Function cutoff 

Source
pub fn cutoff(
    recorded: usize,
    window: usize,
    truncated: bool,
    shallow: impl FnOnce() -> Result<bool>,
) -> Result<Option<Cutoff>>
Expand description

Decide whether the walk was cut short, and by what.

truncated says history continued past SCAN_LIMIT — see gather for how that is known rather than guessed. Otherwise the walk reached the end of the history this checkout has: the root, or a shallow clone’s boundary, which only shallow can tell apart. A window that filled was cut short by neither, however deep the history.