Skip to main content

through

Function through 

Source
fn through(text: &str, at: Rev) -> Result<&str, PrefixFailure>
Expand description

The leading run of text’s lines that reaches no further than at.

A contiguous prefix, because that is what keeps the hash chain whole: a line dropped from the middle would leave its successor naming a parent that is no longer there. Which means the tags that survive are the ones written before the cut — and a tag can only ever name a rev the history already held, so every one of them names a rev at or before at. The names given later to revs inside the cut are named_through’s to put back.