0.5.0- 2026-04-27
This is a major release introducing multi-file patch support,
git binary diff handling, and no_std compatibility.
- #73
The crate is now
no_stdby default.Patch::to_bytes()andPatchFormatter::write_patch_into()now require thestdfeature. Addfeatures = ["std"]to restore them. - #46
Color support is now behind the
colorfeature flag. Previously color was always available. NowPatchFormatter::with_color()requires enabling thecolorfeature. The underlying implementation switched fromnu-ansi-termtoanstyle.
- #55
#59
#61
#66
#74
#76
Multi-file patch support.
Parse and apply unified diff and
git diffoutput containing multiple files, including create, delete, modify, rename, and copy operations. Git binary patches (literalanddelta) are supported behind thebinaryfeature flag. - #80
New
applyexample demonstrating multi-file patch application.
- #51
#82
Patch::from_str/from_bytesno longer error on trailing non-patch content after a complete hunk, matching GNU patch andgit applybehavior. - #65
Return an error instead of panicking on non-UTF-8 escaped filenames
when parsing as
str. - #47
Fix quoted filename escaping: handle
\a,\b,\f,\v, 3-digit octal escapes (\0xx–\3xx), and quote all control characters. - #83 Fix arithmetic overflow panic when parsing hunk headers with extremely large range values.
- #79 Bump MSRV to 1.85 (Rust 2024 edition).
- #48 #50 Parse error messages now show the byte offset where parsing failed.
0.4.2 - 2025-01-29
- #37 Allow configuring the "No newline at end of file" message from being printed when formatting a patch.
- #38 Add support for configuring
suppress_blank_empty.
0.4.1 - 2025-01-29
- #36 Add ability to configure
filenames when creating a patch with
DiffOptions.
0.4.0 - 2024-06-14
- #28 Fixed an issue where conflicts were being omitted from merges.
- #26 Add ability to reverse a patch.
- #29 Bump minimum supported rust version (msrv) to 1.62.1.
- #22 update nu-ansi-term dependency to 0.50.
0.3.0 - 2022-08-29
- #17 Fix an issue which resulted in a large slowdown when applying a patch with incorrect hunk headers.
- #18 Replace unmaintained ansi_term dependency with nu_ansi_term in order to address RUSTSEC-2021-0139.
- #19 Bump minimum supported rust version (msrv) to 1.51.0.
0.2.2 - 2022-01-31
- #16 Fix an issue where patch files failed to parse when they contained hunks which were adjacent to one another.
0.2.1 - 2021-01-27
- #9 Fix an issue where the incorrect range was being used to index an array when calculating a merge resulting in a panic in some cases.
0.2.0 - 2020-07-07
- Support for working with potentially non-utf8 data with the addition of
various
*_bytesfunctions. - Support for writing both utf8 and non-utf8 patches into a writer
W: io::write - Support for a minimum supported rust version (msrv) of 1.36.0.
- The
Patchtype is now generic across the text type, eitherstrfor utf8 text and[u8]for potentially non-utf8 texts. - The filenames for the original and modified files of a patch are now optional. This means that patches which don't include filename headers (only include hunks) can now properly be parsed.
- Quoted filenames which include escaped characters are now properly parsed.
0.1.1 - 2020-07-01
Patches can now be parsed from strings withPatch::from_str- A
Patchcan now be applied to a base image withapply
0.1.0 - 2020-06-30
- Initial release.