Skip to main content

get_line_stats

Function get_line_stats 

Source
pub fn get_line_stats(repo_root: &Path) -> Result<Vec<FileDiffStats>>
Expand description

Retrieves line additions and removals for tracked files changed from HEAD.

The repository’s HEAD tree is compared with its index and working tree. Staged and unstaged changes are included. Untracked files and binary files do not produce line statistics.

§Errors

  • The repository, its HEAD tree, or its working tree diff cannot be read.