<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/diff.h, branch ethomson/winhttp</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>diff: expose the "indent heuristic" in the diff options</title>
<updated>2017-11-19T07:20:18+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2017-10-29T14:05:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=7e3faf58cbafd1115d0f4bf6e5a2b422f9ef78f1'/>
<id>7e3faf58cbafd1115d0f4bf6e5a2b422f9ef78f1</id>
<content type='text'>
We default to off, but we might want to consider changing `GIT_DIFF_NORMAL` to
include it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We default to off, but we might want to consider changing `GIT_DIFF_NORMAL` to
include it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Docs: Fix inline comments for git_diff_hunk</title>
<updated>2017-08-11T21:15:51+00:00</updated>
<author>
<name>Alpha</name>
<email>alpha0010@users.noreply.github.com</email>
</author>
<published>2017-08-11T21:15:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2a3cfc236d53e50244451190dfd563966192ce91'/>
<id>2a3cfc236d53e50244451190dfd563966192ce91</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: implement function to calculate patch ID</title>
<updated>2017-06-26T13:39:26+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-06-16T11:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=89a3482829c77590b3cc4fe95a33b93eebaecff5'/>
<id>89a3482829c77590b3cc4fe95a33b93eebaecff5</id>
<content type='text'>
The upstream git project provides the ability to calculate a so-called
patch ID. Quoting from git-patch-id(1):

    A "patch ID" is nothing but a sum of SHA-1 of the file diffs
    associated with a patch, with whitespace and line numbers ignored."

Patch IDs can be used to identify two patches which are probably the
same thing, e.g. when a patch has been cherry-picked to another branch.

This commit implements a new function `git_diff_patchid`, which gets a
patch and derives an OID from the diff. Note the different terminology
here: a patch in libgit2 are the differences in a single file and a diff
can contain multiple patches for different files. The implementation
matches the upstream implementation and should derive the same OID for
the same diff. In fact, some code has been directly derived from the
upstream implementation.

The upstream implementation has two different modes to calculate patch
IDs, which is the stable and unstable mode. The old way of calculating
the patch IDs was unstable in a sense that a different ordering the
diffs was leading to different results. This oversight was fixed in git
1.9, but as git tries hard to never break existing workflows, the old
and unstable way is still default. The newer and stable way does not
care for ordering of the diff hunks, and in fact it is the mode that
should probably be used today. So right now, we only implement the
stable way of generating the patch ID.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The upstream git project provides the ability to calculate a so-called
patch ID. Quoting from git-patch-id(1):

    A "patch ID" is nothing but a sum of SHA-1 of the file diffs
    associated with a patch, with whitespace and line numbers ignored."

Patch IDs can be used to identify two patches which are probably the
same thing, e.g. when a patch has been cherry-picked to another branch.

This commit implements a new function `git_diff_patchid`, which gets a
patch and derives an OID from the diff. Note the different terminology
here: a patch in libgit2 are the differences in a single file and a diff
can contain multiple patches for different files. The implementation
matches the upstream implementation and should derive the same OID for
the same diff. In fact, some code has been directly derived from the
upstream implementation.

The upstream implementation has two different modes to calculate patch
IDs, which is the stable and unstable mode. The old way of calculating
the patch IDs was unstable in a sense that a different ordering the
diffs was leading to different results. This oversight was fixed in git
1.9, but as git tries hard to never break existing workflows, the old
and unstable way is still default. The newer and stable way does not
care for ordering of the diff hunks, and in fact it is the mode that
should probably be used today. So right now, we only implement the
stable way of generating the patch ID.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: treat binary patches with no data special</title>
<updated>2016-09-05T17:26:47+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-09-02T07:03:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=adedac5aba9e4525475fd59d751cd02c6f2b3a4f'/>
<id>adedac5aba9e4525475fd59d751cd02c6f2b3a4f</id>
<content type='text'>
When creating and printing diffs, deal with binary deltas that have
binary data specially, versus diffs that have a binary file but lack the
actual binary data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating and printing diffs, deal with binary deltas that have
binary data specially, versus diffs that have a binary file but lack the
actual binary data.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: document `git_diff_from_buffer`</title>
<updated>2016-08-06T00:01:52+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-08-06T00:00:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e2e7f31ad0c174187f50488d3fafa38f709fb097'/>
<id>e2e7f31ad0c174187f50488d3fafa38f709fb097</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>git_diff_file: move `id_abbrev`</title>
<updated>2016-08-03T21:57:37+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-08-03T21:09:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=002c8e29a1bbe7bf5c07c9c26037d4f6a1ac81a6'/>
<id>002c8e29a1bbe7bf5c07c9c26037d4f6a1ac81a6</id>
<content type='text'>
Move `id_abbrev` to a more reasonable place where it packs more nicely
(before anybody starts using it).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move `id_abbrev` to a more reasonable place where it packs more nicely
(before anybody starts using it).
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce `git_diff_to_buf`</title>
<updated>2016-05-26T18:01:09+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-04-25T16:40:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=728274904f69fef48752d77c8cf75fc3aaf7808c'/>
<id>728274904f69fef48752d77c8cf75fc3aaf7808c</id>
<content type='text'>
Like `git_patch_to_buf`, provide a simple helper method that can
print an entire diff directory to a `git_buf`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like `git_patch_to_buf`, provide a simple helper method that can
print an entire diff directory to a `git_buf`.
</pre>
</div>
</content>
</entry>
<entry>
<title>introduce `git_diff_from_buffer` to parse diffs</title>
<updated>2016-05-26T18:01:09+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-04-25T04:35:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=7166bb16659790ae2b398e1e95c752f784f6f1d3'/>
<id>7166bb16659790ae2b398e1e95c752f784f6f1d3</id>
<content type='text'>
Parse diff files into a `git_diff` structure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parse diff files into a `git_diff` structure.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: include oid length in deltas</title>
<updated>2016-05-26T18:01:05+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-09-22T22:25:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d68cb736776e0f2f9494b49e2da30a9c4b9fc2c7'/>
<id>d68cb736776e0f2f9494b49e2da30a9c4b9fc2c7</id>
<content type='text'>
Now that `git_diff_delta` data can be produced by reading patch
file data, which may have an abbreviated oid, allow consumers to
know that the id is abbreviated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that `git_diff_delta` data can be produced by reading patch
file data, which may have an abbreviated oid, allow consumers to
know that the id is abbreviated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch parsing from patch files</title>
<updated>2016-05-26T16:36:11+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-04-09T00:18:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d34f68261ef95b517944d4fa89ee13b4a68d3cb4'/>
<id>d34f68261ef95b517944d4fa89ee13b4a68d3cb4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
