pub fn write_patch<W: Write>(
repo: &Repository,
entries: &[DiffEntry],
opts: &PatchTextOptions,
out: &mut W,
) -> Result<()>Expand description
Write git diff --binary-style patches for tree diff entries (for git apply).
Emits diff --git headers, index lines, unified hunks or GIT binary patch bodies.
ยงErrors
Propagates ODB reads, diff generation, and I/O errors.