Releases: bluekeyes/go-gitdiff
Releases · bluekeyes/go-gitdiff
v0.8.0
Improvements
- Add the
File.String()
method to convert a parsed file back to a patch representation (#48)
Changes
- Set the module's Go version to 1.21 to due to usage of generics and the
slices
package in test code
v0.7.4
Fixes
- Return the input as the preamble, instead of an empty string, when a patch has no files (#46)
v0.7.3
Improvements
- Accept invalid (according to RFC 5322) email addresses in
From:
lines of mail-formatted patches (#44)
- More closely follow Git's logic when parsing identities with
ParsePatchIdentity
(#44)
- Extract email addresses even when they do not appear in angle brackets
- Consider content that appears after the email address as part of the name
- Unquote escaped characters in quoted strings and RFC 5322 comments
- Normalize runs of white space in names to single space characters
v0.7.2
Improvements
- Accept more inputs in
ParsePatchIdentity
(#42)
- Allow identity strings with empty email address (must still include
<>
markers)
- When an identity contains only an email address, also use it to set the
Name
field
v0.7.1
Fixes
- Fix error parsing mode lines with trailing whitespace (#38)
v0.7.0
API Breaks
- Remove the
Applier
type and replace it with TextApplier
and BinaryApplier
. This does not impact clients that only use the top-level Apply
function (#32).
Improvements
- Add an option to control which content is removed from subject lines when parsing the headers of mail-formatted patches (#36)
- Simplify internal logic for patch header parsing (#34)
- Run tests and lint checks with Go 1.19 (#35)
v0.6.1
Fixes
- Fix out-of-bounds panic in timestamp parsing (#28)
- Fix panic when parsing certain invalid text fragments (#29)
- Return an error when parsing text fragments that contain only context lines (#29)
- Use
ioutil
to retain compatibility with Go versions prior to 1.16 (#31)
v0.6.0
API Breaks
- Improve the behavior of the
LineReaderAt
interface when the final line does not have a newline character. This change is only relevant for clients that define LineReaderAt
implementations and should not affect most users of the library. If you use a custom LineReaderAt
implementation, please review the documentation and update your implementation to avoid errors (#27).
Fixes
- Fix apply errors (unexpected EOF) with files that are multiples of 1024 bytes and have no final newline (#27).
v0.5.2
Improvements
- Decode quoted-printable UTF-8 subjects when parsing mail-formatted patch headers (#25)
v0.5.1
Improvements
- Relax requirements for mail-formatted patch headers (#20)
Fixes
- Fix parsing for file names with spaces (#24)