Skip to content

Releases: bluekeyes/go-gitdiff

v0.8.0

20 Aug 03:16
8584cd5
Compare
Choose a tag to compare

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

19 Jul 03:44
0a4e55f
Compare
Choose a tag to compare

Fixes

  • Return the input as the preamble, instead of an empty string, when a patch has no files (#46)

v0.7.3

06 May 03:29
a00d2cc
Compare
Choose a tag to compare

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

07 Mar 05:37
3f2ea5c
Compare
Choose a tag to compare

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

17 Mar 05:05
981bc4b
Compare
Choose a tag to compare

Fixes

  • Fix error parsing mode lines with trailing whitespace (#38)

v0.7.0

01 Oct 22:43
Compare
Choose a tag to compare

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

18 Mar 20:57
52645c6
Compare
Choose a tag to compare

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

20 Aug 00:59
53bcdf7
Compare
Choose a tag to compare

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

19 Jul 18:50
b575654
Compare
Choose a tag to compare

Improvements

  • Decode quoted-printable UTF-8 subjects when parsing mail-formatted patch headers (#25)

v0.5.1

24 Apr 22:26
3772c9e
Compare
Choose a tag to compare

Improvements

  • Relax requirements for mail-formatted patch headers (#20)

Fixes

  • Fix parsing for file names with spaces (#24)