<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable/iter.c, branch v2.41.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-01-20T19:31:53Z</updated>
<entry>
<title>reftable: make reftable_record a tagged union</title>
<updated>2022-01-20T19:31:53Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-01-20T15:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66c0dabab5e15f78d0505be36cac4a383e14cf88'/>
<id>urn:sha1:66c0dabab5e15f78d0505be36cac4a383e14cf88</id>
<content type='text'>
This reduces the amount of glue code, because we don't need a void
pointer or vtable within the structure.

The only snag is that reftable_index_record contain a strbuf, so it
cannot be zero-initialized. To address this, use reftable_new_record()
to return fresh instance, given a record type. Since
reftable_new_record() doesn't cause heap allocation anymore, it should
be balanced with reftable_record_release() rather than
reftable_record_destroy().

Thanks to Peff for the suggestion.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: read reftable files</title>
<updated>2021-10-08T17:45:48Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2021-10-07T20:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46bc0e731a70716485bc3c8bdaf7e6e6f88073a9'/>
<id>urn:sha1:46bc0e731a70716485bc3c8bdaf7e6e6f88073a9</id>
<content type='text'>
This supports reading a single reftable file.

The commit introduces an abstract iterator type, which captures the usecases
both of reading individual refs, and iterating over a segment of the ref
namespace.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
