<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git, branch cmn/config-snapshot</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>repository: introduce a convenience config snapshot method</title>
<updated>2014-05-07T09:34:32+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-05-07T09:34:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ac99d86ba5e2a9d2332b7f82737e1231c621dc43'/>
<id>ac99d86ba5e2a9d2332b7f82737e1231c621dc43</id>
<content type='text'>
Accessing the repository's config and immediately taking a snapshot of
it is a common operation, so let's provide a convenience function for
it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Accessing the repository's config and immediately taking a snapshot of
it is a common operation, so let's provide a convenience function for
it.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: share the strmap on snapshot</title>
<updated>2014-04-18T14:13:43+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-04-09T11:17:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2280b388c913cbc4eee35ce99c760316206e2703'/>
<id>2280b388c913cbc4eee35ce99c760316206e2703</id>
<content type='text'>
Now that our strmap is no longer modified but replaced, we can use the
same strmap for the snapshot's values and it will be freed when we don't
need it anymore.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that our strmap is no longer modified but replaced, we can use the
same strmap for the snapshot's values and it will be freed when we don't
need it anymore.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: refcount the values map</title>
<updated>2014-04-18T14:12:31+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-04-09T11:08:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=4b99b8f52844cb66b2b61b9e88b37b5f98515d50'/>
<id>4b99b8f52844cb66b2b61b9e88b37b5f98515d50</id>
<content type='text'>
This is mostly groundwork to let us re-use the map in the snapshots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is mostly groundwork to let us re-use the map in the snapshots.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: refresh on delete</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-04-09T10:26:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8c1f4ab4abdb47c7926fa678577973272be6e2df'/>
<id>8c1f4ab4abdb47c7926fa678577973272be6e2df</id>
<content type='text'>
When we delete an entry, we also want to refresh the configuration to
catch any changes that happened externally.

This allows us to simplify the logic, as we no longer need to delete
these variables internally. The whole state will be refreshed and the
deleted entries won't be there.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we delete an entry, we also want to refresh the configuration to
catch any changes that happened externally.

This allows us to simplify the logic, as we no longer need to delete
these variables internally. The whole state will be refreshed and the
deleted entries won't be there.
</pre>
</div>
</content>
</entry>
<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://91.123.203.49/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: refresh before reading a value</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-31T07:58:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=523032cd24e5b238752394bd1b691a3e28ba321e'/>
<id>523032cd24e5b238752394bd1b691a3e28ba321e</id>
<content type='text'>
With the isolation of complex reads, we can now try to refresh the
on-disk file before reading a value from it.

This changes the semantics a bit, as before we could be sure that a
string we got from the configuration was valid until we wrote or
refreshed. This is no longer the case, as a read can also invalidate the
pointer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the isolation of complex reads, we can now try to refresh the
on-disk file before reading a value from it.

This changes the semantics a bit, as before we could be sure that a
string we got from the configuration was valid until we wrote or
refreshed. This is no longer the case, as a read can also invalidate the
pointer.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: refresh the values on write</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-31T06:53:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=eaf3703401a64d59fd8bf2609449343d739ef056'/>
<id>eaf3703401a64d59fd8bf2609449343d739ef056</id>
<content type='text'>
When writing out, parse the resulting file instead of adding or
replacing the value locally. This has the effect of reading external
changes as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When writing out, parse the resulting file instead of adding or
replacing the value locally. This has the effect of reading external
changes as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: use a snapshot for the iterator</title>
<updated>2014-04-18T14:07:32+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-03-31T06:32:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0500a1ef4e61449a7ad375c1f42d3bd25a4e36bd'/>
<id>0500a1ef4e61449a7ad375c1f42d3bd25a4e36bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>config: split out the refresh step</title>
<updated>2014-04-18T14:07:32+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-03-31T06:08:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=bd95f836f51804011b8a8c532471733f92f3e119'/>
<id>bd95f836f51804011b8a8c532471733f92f3e119</id>
<content type='text'>
This will be used by the writing commands in a later step.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be used by the writing commands in a later step.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: make refresh atomic</title>
<updated>2014-04-18T14:06:04+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-03-18T16:54:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c047317e400efc75b07aa0fff61ee1fcd794e74e'/>
<id>c047317e400efc75b07aa0fff61ee1fcd794e74e</id>
<content type='text'>
Current code sets the active map to a new one and builds it whilst it's
active. This is a race condition with someone else trying to access the
same config.

Instead, let's build up our new map and swap the active and new one.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current code sets the active map to a new one and builds it whilst it's
active. This is a race condition with someone else trying to access the
same config.

Instead, let's build up our new map and swap the active and new one.
</pre>
</div>
</content>
</entry>
</feed>
