Function git_log_commits

Source
pub fn git_log_commits(
    in_directory: impl AsRef<Path>,
    entry_reference: &str,
) -> Result<Vec<GitCommit<GitHash>>>
Expand description

Returns the commits with the newest one first. Careful: GitHistory::from_commits expects them in the reverse order of this one. This returns a Vec (for lifetime reasons but also) because it needs to be reversed afterwards, but also because following branched Git history (via git log) can find branch with known commits at some point, but the other still needing exploration. Would need to analyze the history on the go to know if stopping is OK. Thus for now, just get the whole history. Returns the empty vector if the given reference does not resolve! You usually do not want to use this function directly, but instead initialize a GitGraph, get the lock, then run add_history_from_dir_ref on it, which then uses this function.