tag:github.com,2008:https://github.com/bluekeyes/go-gitdiff/releasesRelease notes from go-gitdiff2025-01-08T03:35:14Ztag:github.com,2008:Repository/174927719/v0.8.12025-01-08T03:38:43Zv0.8.1<h3>Fixes</h3>
<ul>
<li>Parse binary file headers that include file paths (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2774170684" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/55" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/55/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/55">#55</a>)</li>
<li>Fix binary file headers when formatting a patch as a string (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2774188466" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/56" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/56/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/56">#56</a>)</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.8.02024-08-20T03:16:58Zv0.8.0<h3>Improvements</h3>
<ul>
<li>Add the <code>File.String()</code> method to convert a parsed file back to a patch representation (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2457078925" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/48" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/48/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/48">#48</a>)</li>
</ul>
<h3>Changes</h3>
<ul>
<li>Set the module's Go version to 1.21 to due to usage of generics and the <code>slices</code> package in test code</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.7.42024-07-19T03:44:16Zv0.7.4<h3>Fixes</h3>
<ul>
<li>Return the input as the preamble, instead of an empty string, when a patch has no files (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2407797232" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/46" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/46/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/46">#46</a>)</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.7.32024-05-06T03:29:52Zv0.7.3<h3>Improvements</h3>
<ul>
<li>Accept invalid (according to RFC 5322) email addresses in <code>From:</code> lines of mail-formatted patches (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2279926344" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/44" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/44/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/44">#44</a>)</li>
<li>More closely follow Git's logic when parsing identities with <code>ParsePatchIdentity</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2279926344" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/44" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/44/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/44">#44</a>)
<ul>
<li>Extract email addresses even when they do not appear in angle brackets</li>
<li>Consider content that appears after the email address as part of the name</li>
<li>Unquote escaped characters in quoted strings and RFC 5322 comments</li>
<li>Normalize runs of white space in names to single space characters</li>
</ul>
</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.7.22024-03-07T05:39:21Zv0.7.2<h3>Improvements</h3>
<ul>
<li>Accept more inputs in <code>ParsePatchIdentity</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2172992135" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/42" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/42/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/42">#42</a>)
<ul>
<li>Allow identity strings with empty email address (must still include <code><></code> markers)</li>
<li>When an identity contains only an email address, also use it to set the <code>Name</code> field</li>
</ul>
</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.7.12023-03-17T05:05:51Zv0.7.1<h3>Fixes</h3>
<ul>
<li>Fix error parsing mode lines with trailing whitespace (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1511294494" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/38" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/38/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/38">#38</a>)</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.7.02022-10-01T22:43:44Zv0.7.0<h3>API Breaks</h3>
<ul>
<li>Remove the <code>Applier</code> type and replace it with <code>TextApplier</code> and <code>BinaryApplier</code>. This does not impact clients that only use the top-level <code>Apply</code> function (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1174087385" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/32" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/32/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/32">#32</a>).</li>
</ul>
<h3>Improvements</h3>
<ul>
<li>Add an option to control which content is removed from subject lines when parsing the headers of mail-formatted patches (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1393561465" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/36" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/36/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/36">#36</a>)</li>
<li>Simplify internal logic for patch header parsing (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1393248520" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/34" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/34/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/34">#34</a>)</li>
<li>Run tests and lint checks with Go 1.19 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1393249945" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/35" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/35/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/35">#35</a>)</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.6.12022-03-18T20:57:53Zv0.6.1<h3>Fixes</h3>
<ul>
<li>Fix out-of-bounds panic in timestamp parsing (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="992507378" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/28" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/28/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/28">#28</a>)</li>
<li>Fix panic when parsing certain invalid text fragments (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="994302030" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/29" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/29/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/29">#29</a>)</li>
<li>Return an error when parsing text fragments that contain only context lines (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="994302030" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/29" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/29/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/29">#29</a>)</li>
<li>Use <code>ioutil</code> to retain compatibility with Go versions prior to 1.16 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1152257063" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/31" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/31/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/31">#31</a>)</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.6.02021-08-20T00:59:27Zv0.6.0<h3>API Breaks</h3>
<ul>
<li>Improve the behavior of the <code>LineReaderAt</code> interface when the final line does not have a newline character. This change is only relevant for clients that define <code>LineReaderAt</code> implementations and should not affect most users of the library. If you use a custom <code>LineReaderAt</code> implementation, please review the documentation and update your implementation to avoid errors (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="975148089" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/27" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/27/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/27">#27</a>).</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Fix apply errors (unexpected EOF) with files that are multiples of 1024 bytes and have no final newline (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="975148089" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/27" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/27/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/27">#27</a>).</li>
</ul>bluekeyestag:github.com,2008:Repository/174927719/v0.5.22021-07-19T18:50:37Zv0.5.2<h3>Improvements</h3>
<ul>
<li>Decode quoted-printable UTF-8 subjects when parsing mail-formatted patch headers (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="947793626" data-permission-text="Title is private" data-url="https://github.com/bluekeyes/go-gitdiff/issues/25" data-hovercard-type="pull_request" data-hovercard-url="/bluekeyes/go-gitdiff/pull/25/hovercard" href="https://github.com/bluekeyes/go-gitdiff/pull/25">#25</a>)</li>
</ul>bluekeyes