<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/config.h, branch cmn/read-tree-cache</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>config: document the how long the pointers are valid for</title>
<updated>2014-04-18T14:07:33+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-03-31T08:13:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c20d71eac928fef34a89ced3cbb6502ab2763dc9'/>
<id>c20d71eac928fef34a89ced3cbb6502ab2763dc9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>config: implement config snapshotting</title>
<updated>2014-04-18T14:03:01+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-03-13T16:11:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=55ebd7d369a789f27fe1ad6b8ec8965aa1335d08'/>
<id>55ebd7d369a789f27fe1ad6b8ec8965aa1335d08</id>
<content type='text'>
In order to have consistent views of the config files for remotes,
submodules et al. and a configuration that represents what is currently
stored on-disk, we need a way to provide a view of the configuration
that does not change.

The goal here is to provide the snapshotting part by creating a
read-only copy of the state of the configuration at a particular point
in time, which does not change when a repository's main config changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to have consistent views of the config files for remotes,
submodules et al. and a configuration that represents what is currently
stored on-disk, we need a way to provide a view of the configuration
that does not change.

The goal here is to provide the snapshotting part by creating a
read-only copy of the state of the configuration at a particular point
in time, which does not change when a repository's main config changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: use git_buf for returning paths</title>
<updated>2014-01-27T03:44:05+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-01-26T15:11:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ee550477d1c22273d6d9701b444041ff101144ec'/>
<id>ee550477d1c22273d6d9701b444041ff101144ec</id>
<content type='text'>
Again, we already did this internally, so simply remove the conversions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Again, we already did this internally, so simply remove the conversions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update docs for new callback return value behavior</title>
<updated>2013-12-11T18:57:50+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-12-09T18:17:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=373cf6a932a64d1cbe5f5cd8333546dcc2ca0b92'/>
<id>373cf6a932a64d1cbe5f5cd8333546dcc2ca0b92</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://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>
<entry>
<title>Fix saving remotes with several fetch/push ref specs.</title>
<updated>2013-10-31T23:08:52+00:00</updated>
<author>
<name>Daniel Rodríguez Troitiño</name>
<email>drodrigueztroitino@yahoo.es</email>
</author>
<published>2013-10-31T00:08:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3793fa9b181f3595c24a1cc517646f8e7a4a7175'/>
<id>3793fa9b181f3595c24a1cc517646f8e7a4a7175</id>
<content type='text'>
At some moment git_config_delete_entry lost the ability to delete one entry of
a multivar configuration. The moment you had more than one fetch or push
ref spec for a remote you will not be able to save that remote anymore. The
changes in network::remote::remotes::save show that problem.

I needed to create a new git_config_delete_multivar because I was not able to
remove one or several entries of a multivar config with the current API.
Several tries modifying how git_config_set_multivar(..., NULL) behaved were
not successful.

git_config_delete_multivar is very similar to git_config_set_multivar, and
delegates into config_delete_multivar of config_file. This function search
for the cvar_t that will be deleted, storing them in a temporal array, and
rebuilding the linked list. After calling config_write to delete the entries,
the cvar_t stored in the temporal array are freed.

There is a little fix in config_write, it avoids an infinite loop when using
a regular expression (case for the multivars). This error was found by the
test network::remote::remotes::tagopt.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At some moment git_config_delete_entry lost the ability to delete one entry of
a multivar configuration. The moment you had more than one fetch or push
ref spec for a remote you will not be able to save that remote anymore. The
changes in network::remote::remotes::save show that problem.

I needed to create a new git_config_delete_multivar because I was not able to
remove one or several entries of a multivar config with the current API.
Several tries modifying how git_config_set_multivar(..., NULL) behaved were
not successful.

git_config_delete_multivar is very similar to git_config_set_multivar, and
delegates into config_delete_multivar of config_file. This function search
for the cvar_t that will be deleted, storing them in a temporal array, and
rebuilding the linked list. After calling config_write to delete the entries,
the cvar_t stored in the temporal array are freed.

There is a little fix in config_write, it avoids an infinite loop when using
a regular expression (case for the multivars). This error was found by the
test network::remote::remotes::tagopt.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: don't special-case the multivar iterator</title>
<updated>2013-08-13T22:45:05+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2013-08-13T22:45:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f4be8209afd3cc996667196a1e437aac21485691'/>
<id>f4be8209afd3cc996667196a1e437aac21485691</id>
<content type='text'>
Build it on top of the normal iterator instead, which lets use re-use
a lot of code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Build it on top of the normal iterator instead, which lets use re-use
a lot of code.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: introduce a regex-filtering iterator</title>
<updated>2013-08-12T09:40:57+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2013-08-09T08:29:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=54f3a572b4fac419008afa83da56c1b0daee1257'/>
<id>54f3a572b4fac419008afa83da56c1b0daee1257</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>config: introduce _iterator_new()</title>
<updated>2013-08-12T09:40:57+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2013-08-09T07:05:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=5880962d90958bc37c08c21d37c9da480ef20e7f'/>
<id>5880962d90958bc37c08c21d37c9da480ef20e7f</id>
<content type='text'>
As the name suggests, it iterates over all the entries
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As the name suggests, it iterates over all the entries
</pre>
</div>
</content>
</entry>
<entry>
<title>config: add _next() and _iterator_free()</title>
<updated>2013-08-08T18:47:06+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2013-08-08T18:47:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1e96c9d5341e5f2b0e1af9a1088cc30d3ffb9a01'/>
<id>1e96c9d5341e5f2b0e1af9a1088cc30d3ffb9a01</id>
<content type='text'>
Make it look like the refs iterator API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it look like the refs iterator API.
</pre>
</div>
</content>
</entry>
</feed>
