Skip to main content

commits_in

Function commits_in 

Source
pub fn commits_in(
    repo: &Path,
    asked: &str,
    most: usize,
) -> Result<Vec<String>, Trouble>
Expand description

The commits to walk, newest first — git’s own order.

Three ways of asking: a range, main~10..main, which is exactly what somebody meant; a revspec, HEAD, meaning the history back from there capped at most; and ALL, every branch, which is the default because that is the shape an investigation has.

A range cannot be the default, because HEAD~10..HEAD in a repository with four commits is not an empty answer but an unknown-revision error, and that is not something to hand somebody who typed nothing at all.