Skip to main content

split_file_by_hunk

Function split_file_by_hunk 

Source
pub fn split_file_by_hunk(file_diff: &FileDiff) -> Vec<HunkDiff>
Expand description

Splits a FileDiff into per-hunk segments.

Each HunkDiff includes the file header so it is self-contained. A file with no hunks (e.g., binary files, mode-only changes) returns an empty Vec.