Skip to main content

parse_git_diff_name_status

Function parse_git_diff_name_status 

Source
pub fn parse_git_diff_name_status(output: &str) -> Vec<FileChange>
Expand description

Parse git diff --name-status output into structured FileChange values.

git produces tab-separated lines — status letter, then path(s), separated by tabs. Examples: M<TAB>path.rs, R100<TAB>old.rs<TAB>new.rs.

The leading status letter may be followed by a similarity score (e.g. R100, C75); the score is recognized but not retained.

Unknown status letters are skipped. Blank lines are skipped.