<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/diff/rename.c, branch peff/binary-search-do-while</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>patch: show copy information for identical copies</title>
<updated>2016-06-26T03:08:30+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-04-26T05:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1a79cd959ba2991dd3295f9940b28b606e494ccf'/>
<id>1a79cd959ba2991dd3295f9940b28b606e494ccf</id>
<content type='text'>
When showing copy information because we are duplicating contents,
for example, when performing a `diff --find-copies-harder -M100 -B100`,
then show copy from/to lines in a patch, and do not show context.
Ensure that we can also parse such patches.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When showing copy information because we are duplicating contents,
for example, when performing a `diff --find-copies-harder -M100 -B100`,
then show copy from/to lines in a patch, and do not show context.
Ensure that we can also parse such patches.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: introduce binary diff callbacks</title>
<updated>2015-06-12T13:39:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2015-05-26T00:03:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8147b1aff56c0f36f6afee9b8810fc74776e1f58'/>
<id>8147b1aff56c0f36f6afee9b8810fc74776e1f58</id>
<content type='text'>
Introduce a new binary diff callback to provide the actual binary
delta contents to callers.  Create this data from the diff contents
(instead of directly from the ODB) to support binary diffs including
the workdir, not just things coming out of the ODB.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new binary diff callback to provide the actual binary
delta contents to callers.  Create this data from the diff contents
(instead of directly from the ODB) to support binary diffs including
the workdir, not just things coming out of the ODB.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_tform: account for whitespace options</title>
<updated>2015-03-04T05:01:34+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-03-04T04:56:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f78d9b6cfe721539b4ecf0ae6d01367b13959a45'/>
<id>f78d9b6cfe721539b4ecf0ae6d01367b13959a45</id>
<content type='text'>
When comparing seemingly blank files, take whitespace options into
account.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When comparing seemingly blank files, take whitespace options into
account.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_tform: don't compare empty hashsig_heaps</title>
<updated>2015-03-03T23:19:42+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-03-03T23:19:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a212716fc3ab684c67e1a1c8c45dc3e88f87b0a1'/>
<id>a212716fc3ab684c67e1a1c8c45dc3e88f87b0a1</id>
<content type='text'>
Don't try to compare two empty hashsig_heaps.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't try to compare two empty hashsig_heaps.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the signature from ref-modifying functions</title>
<updated>2015-03-03T13:40:50+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-01-07T12:23:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=659cf2029f322ea876d663d85783b48945227e8f'/>
<id>659cf2029f322ea876d663d85783b48945227e8f</id>
<content type='text'>
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.

In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.

In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added GIT_HASHSIG_ALLOW_SMALL_FILES to allow computing signatures for small files</title>
<updated>2015-01-14T16:17:56+00:00</updated>
<author>
<name>Pierre-Olivier Latour</name>
<email>pol@mac.com</email>
</author>
<published>2014-12-02T13:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=36fc5497810f60cacdfab249c84583d25032a150'/>
<id>36fc5497810f60cacdfab249c84583d25032a150</id>
<content type='text'>
The implementation of the hashsig API disallows computing a signature on
small files containing only a few lines. This new flag disables this
behavior.

git_diff_find_similar() sets this flag by default which means that rename
/ copy detection of small files will now work. This in turn affects the
behavior of the git_status and git_blame APIs which will now detect rename
of small files assuming the right options are passed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation of the hashsig API disallows computing a signature on
small files containing only a few lines. This new flag disables this
behavior.

git_diff_find_similar() sets this flag by default which means that rename
/ copy detection of small files will now work. This in turn affects the
behavior of the git_status and git_blame APIs which will now detect rename
of small files assuming the right options are passed.
</pre>
</div>
</content>
</entry>
<entry>
<title>git_checkout_opts -&gt; git_checkout_options</title>
<updated>2014-03-06T17:44:51+00:00</updated>
<author>
<name>Ben Straub</name>
<email>bs@github.com</email>
</author>
<published>2014-01-04T01:38:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=6affd71f33f9a9693425d6f3599ba1f25226c34b'/>
<id>6affd71f33f9a9693425d6f3599ba1f25226c34b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop git_patch_to_str</title>
<updated>2014-01-22T16:51:32+00:00</updated>
<author>
<name>Nicolas Hake</name>
<email>nh@nosebud.de</email>
</author>
<published>2014-01-22T16:51:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c05cd7924d2409741bb4cb1eb3ba843bea7ec4a2'/>
<id>c05cd7924d2409741bb4cb1eb3ba843bea7ec4a2</id>
<content type='text'>
It's hard or even impossible to correctly free the string buffer
allocated by git_patch_to_str in some circumstances. Drop the function
so people have to use git_patch_to_buf instead - git_buf has a dedicated
destructor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's hard or even impossible to correctly free the string buffer
allocated by git_patch_to_str in some circumstances. Drop the function
so people have to use git_patch_to_buf instead - git_buf has a dedicated
destructor.
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: remove the _with_log differentiation</title>
<updated>2014-01-15T12:32:43+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-01-15T11:51:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0b28217bdae4fd64f5b6b8f4cb8a6139518d037e'/>
<id>0b28217bdae4fd64f5b6b8f4cb8a6139518d037e</id>
<content type='text'>
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
</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://git.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>
</feed>
