Skip to main content

write_patch_structured

Function write_patch_structured 

Source
pub fn write_patch_structured<W: Write>(
    repo: &Repository,
    items: &[TreeDiffStructured],
    opts: &PatchTextOptions,
    out: &mut W,
) -> Result<()>
Expand description

Write patch text from precomputed TreeDiffStructured rows.

Use after super::tree_diff_structured_parallel (or grit diff’s commit-range path) to avoid recomputing line diffs.

§Errors

Propagates ODB reads and I/O errors.