Skip to main content

unified_diff_with_prefix

Function unified_diff_with_prefix 

Source
pub fn unified_diff_with_prefix(
    old_content: &str,
    new_content: &str,
    old_path: &str,
    new_path: &str,
    context_lines: usize,
    inter_hunk_context: usize,
    src_prefix: &str,
    dst_prefix: &str,
) -> String
Expand description

Same as unified_diff but with configurable source/destination prefixes.

inter_hunk_context is Git’s --inter-hunk-context: adjacent hunks merge when the unchanged gap between them is at most 2 * context_lines + inter_hunk_context lines.