<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/diff_patch.c, branch bindings/libgit2sharp/020_2</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>Merge pull request #2575 from cirosantilli/factor-struct-typedef</title>
<updated>2014-10-10T16:06:36+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-10-10T16:06:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=bab92a8dcf66d93afb41c946c238841df74fff0e'/>
<id>bab92a8dcf66d93afb41c946c238841df74fff0e</id>
<content type='text'>
[factor] Join typedef and struct definitions in single file.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[factor] Join typedef and struct definitions in single file.</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure patch is initialized to zero, otherwise, the allocated flag may be set</title>
<updated>2014-09-26T10:12:09+00:00</updated>
<author>
<name>Jacques Germishuys</name>
<email>jacquesg@striata.com</email>
</author>
<published>2014-09-25T13:29:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=5387cfee4cf4c4c0410e947f27555d0a6e87dc81'/>
<id>5387cfee4cf4c4c0410e947f27555d0a6e87dc81</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Join typedef and struct definitions in single file.</title>
<updated>2014-09-24T09:00:51+00:00</updated>
<author>
<name>Ciro Santilli</name>
<email>ciro.santilli@gmail.com</email>
</author>
<published>2014-09-18T09:53:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=062804570c3e25170b52f849da173f8266b5e33e'/>
<id>062804570c3e25170b52f849da173f8266b5e33e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix const-correctness of git_patch_get_delta, git_patch_num_hunks, git_patch_num_lines_in_hunk</title>
<updated>2014-04-11T19:55:36+00:00</updated>
<author>
<name>Jacques Germishuys</name>
<email>jacquesg@striata.com</email>
</author>
<published>2014-04-10T10:44:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=7a28f268adc1d2569ce504147af05834ae94c01a'/>
<id>7a28f268adc1d2569ce504147af05834ae94c01a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add buffer to buffer diff and patch APIs</title>
<updated>2014-02-27T22:13:22+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2014-02-27T22:13:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=6789b7a75d1e24a7f4ce34628c6b4561517f0b73'/>
<id>6789b7a75d1e24a7f4ce34628c6b4561517f0b73</id>
<content type='text'>
This adds `git_diff_buffers` and `git_patch_from_buffers`.  This
also includes a bunch of internal refactoring to increase the
shared code between these functions and the blob-to-blob and
blob-to-buffer APIs, as well as some higher level assert helpers
in the tests to also remove redundancy.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds `git_diff_buffers` and `git_patch_from_buffers`.  This
also includes a bunch of internal refactoring to increase the
shared code between these functions and the blob-to-blob and
blob-to-buffer APIs, as well as some higher level assert helpers
in the tests to also remove redundancy.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: rename the file's 'oid' to 'id'</title>
<updated>2014-01-25T07:15:44+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-01-24T19:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=9950bb4e8de076565976128559ff273e9d4a2a78'/>
<id>9950bb4e8de076565976128559ff273e9d4a2a78</id>
<content type='text'>
In the same vein as the previous commits in this series.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the same vein as the previous commits in this series.
</pre>
</div>
</content>
</entry>
<entry>
<title>One more rename/cleanup for callback err functions</title>
<updated>2013-12-11T18:57:50+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-12-09T17:44:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=26c1cb91beccb44425864bd233ed0e35f5801868'/>
<id>26c1cb91beccb44425864bd233ed0e35f5801868</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove converting user error to GIT_EUSER</title>
<updated>2013-12-11T18:57:49+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-12-06T23:07:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=25e0b1576d5f9e5248603f81d3198a65bfccf0ed'/>
<id>25e0b1576d5f9e5248603f81d3198a65bfccf0ed</id>
<content type='text'>
This changes the behavior of callbacks so that the callback error
code is not converted into GIT_EUSER and instead we propagate the
return value through to the caller.  Instead of using the
giterr_capture and giterr_restore functions, we now rely on all
functions to pass back the return value from a callback.

To avoid having a return value with no error message, the user
can call the public giterr_set_str or some such function to set
an error message.  There is a new helper 'giterr_set_callback'
that functions can invoke after making a callback which ensures
that some error message was set in case the callback did not set
one.

In places where the sign of the callback return value is
meaningful (e.g. positive to skip, negative to abort), only the
negative values are returned back to the caller, obviously, since
the other values allow for continuing the loop.

The hardest parts of this were in the checkout code where positive
return values were overloaded as meaningful values for checkout.
I fixed this by adding an output parameter to many of the internal
checkout functions and removing the overload.  This added some
code, but it is probably a better implementation.

There is some funkiness in the network code where user provided
callbacks could be returning a positive or a negative value and
we want to rely on that to cancel the loop.  There are still a
couple places where an user error might get turned into GIT_EUSER
there, I think, though none exercised by the tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the behavior of callbacks so that the callback error
code is not converted into GIT_EUSER and instead we propagate the
return value through to the caller.  Instead of using the
giterr_capture and giterr_restore functions, we now rely on all
functions to pass back the return value from a callback.

To avoid having a return value with no error message, the user
can call the public giterr_set_str or some such function to set
an error message.  There is a new helper 'giterr_set_callback'
that functions can invoke after making a callback which ensures
that some error message was set in case the callback did not set
one.

In places where the sign of the callback return value is
meaningful (e.g. positive to skip, negative to abort), only the
negative values are returned back to the caller, obviously, since
the other values allow for continuing the loop.

The hardest parts of this were in the checkout code where positive
return values were overloaded as meaningful values for checkout.
I fixed this by adding an output parameter to many of the internal
checkout functions and removing the overload.  This added some
code, but it is probably a better implementation.

There is some funkiness in the network code where user provided
callbacks could be returning a positive or a negative value and
we want to rely on that to cancel the loop.  There are still a
couple places where an user error might get turned into GIT_EUSER
there, I think, though none exercised by the tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve GIT_EUSER handling</title>
<updated>2013-12-11T18:57:49+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-12-04T00:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=96869a4edb2872934e0e167a726ab240f4270fea'/>
<id>96869a4edb2872934e0e167a726ab240f4270fea</id>
<content type='text'>
This adds giterr_user_cancel to return GIT_EUSER and clear any
error message that is sitting around.  As a result of using that
in places, we need to be more thorough with capturing errors that
happen inside a callback when used internally.  To help with that,
this also adds giterr_capture and giterr_restore so that when we
internally use a foreach-type function that clears errors and
converts them to GIT_EUSER, it is easier to restore not just the
return value, but the actual error message text.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds giterr_user_cancel to return GIT_EUSER and clear any
error message that is sitting around.  As a result of using that
in places, we need to be more thorough with capturing errors that
happen inside a callback when used internally.  To help with that,
this also adds giterr_capture and giterr_restore so that when we
internally use a foreach-type function that clears errors and
converts them to GIT_EUSER, it is easier to restore not just the
return value, but the actual error message text.
</pre>
</div>
</content>
</entry>
<entry>
<title>Create git_diff_line and extend git_diff_hunk</title>
<updated>2013-10-21T20:42:42+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-10-21T20:42:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=3b5f795446601868d52d09ebac70ae3b7aee157a'/>
<id>3b5f795446601868d52d09ebac70ae3b7aee157a</id>
<content type='text'>
Instead of having functions with so very many parameters to pass
hunk and line data, this takes the existing git_diff_hunk struct
and extends it with more hunk data, plus adds a git_diff_line.
Those structs are used to pass back hunk and line data instead of
the old APIs that took tons of parameters.

Some work that was previously only being done for git_diff_patch
creation (scanning the diff content for exact line counts) is now
done for all callbacks, but the performance difference should not
be noticable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having functions with so very many parameters to pass
hunk and line data, this takes the existing git_diff_hunk struct
and extends it with more hunk data, plus adds a git_diff_line.
Those structs are used to pass back hunk and line data instead of
the old APIs that took tons of parameters.

Some work that was previously only being done for git_diff_patch
creation (scanning the diff content for exact line counts) is now
done for all callbacks, but the performance difference should not
be noticable.
</pre>
</div>
</content>
</entry>
</feed>
