Skip to main content

changed_lines

Function changed_lines 

Source
pub fn changed_lines(
    root: &Utf8Path,
    base: Option<&str>,
) -> Option<FxHashMap<String, Vec<(u32, u32)>>>
Expand description

Added/modified line ranges per file (relative paths) from git diff --unified=0, combining unstaged + staged + (if base) the base range, plus whole-file ranges for untracked files. None if not a git repo. Enables line-level introduced-vs-inherited attribution.