Skip to main content

generate_patch

Function generate_patch 

Source
pub fn generate_patch(lines: &[DiffLine]) -> String
Expand description

Generates a git unified patch from DiffLines.

The output is suitable for git apply or as a .diff file. Lines without a file_path are skipped since patches require file context.