Skip to main content

build_history_index

Function build_history_index 

Source
pub fn build_history_index(
    root: &Path,
    options: &Options,
) -> Result<HistoryIndex, Error>
Available on crate feature vcs-git only.
Expand description

Walk the change history rooted at root and build a per-file HistoryIndex.

Runs once per invocation (before any AST walk): walking history per file would be catastrophic on large repositories. The single available backend is selected automatically by probing the working tree.

ยงErrors

Returns Error::NotARepository when root is not inside a supported VCS working tree, or a backend-specific variant when the walk itself fails.