<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable/reader.c, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-11-19T03:23:10Z</updated>
<entry>
<title>reftable/system: stop depending on "hash.h"</title>
<updated>2024-11-19T03:23:10Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-11-18T15:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2f08236ed786a48e50af33ecc5c0f951c14761b'/>
<id>urn:sha1:c2f08236ed786a48e50af33ecc5c0f951c14761b</id>
<content type='text'>
We include "hash.h" in "reftable/system.h" such that we can use hash
format IDs as well as the raw size of SHA1 and SHA256. As we are in the
process of converting the reftable library to become standalone we of
course cannot rely on those constants anymore.

Introduce a new `enum reftable_hash` to replace internal uses of the
hash format IDs and new constants that replace internal uses of the hash
size. Adapt the reftable backend to set up the correct hash function.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: explicitly handle hash format IDs</title>
<updated>2024-11-19T03:23:09Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-11-18T15:33:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88e297275b94f2fbbc60b770f37654796799b907'/>
<id>urn:sha1:88e297275b94f2fbbc60b770f37654796799b907</id>
<content type='text'>
The hash format IDs are used for two different things across the
reftable codebase:

  - They are used as a 32 bit unsigned integer when reading and writing
    the header in order to identify the hash function.

  - They are used internally to identify which hash function is in use.

When one only considers the second usecase one might think that one can
easily change the representation of those hash IDs. But because those
IDs end up in the reftable header and footer on disk it is important
that those never change.

Create separate constants `REFTABLE_FORMAT_ID_*` and use them in
contexts where we read or write reftable headers. This serves multiple
purposes:

  - It allows us to more easily discern cases where we actually use
    those constants for the on-disk format.

  - It detangles us from the same constants that are defined in
    libgit.a, which is another required step to convert the reftable
    library to become standalone.

  - It makes the next step easier where we stop using `GIT_*_FORMAT_ID`
    constants in favor of a custom enum.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: handle trivial `reftable_buf` errors</title>
<updated>2024-10-17T20:59:56Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-17T04:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=20590cd287ada9c96efdf804e2bcdac0117c01b8'/>
<id>urn:sha1:20590cd287ada9c96efdf804e2bcdac0117c01b8</id>
<content type='text'>
Convert the reftable library such that we handle failures with the
new `reftable_buf` interfaces.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>reftable/record: adapt `reftable_record_key()` to handle allocation failures</title>
<updated>2024-10-17T20:59:56Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-17T04:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4abc8022ffae64bb24e93153c75bc880991bb2dc'/>
<id>urn:sha1:4abc8022ffae64bb24e93153c75bc880991bb2dc</id>
<content type='text'>
The `reftable_record_key()` function cannot pass any errors to the
caller as it has a `void` return type. Adapt it and its callers such
that we can handle errors and start handling allocation failures.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>reftable: convert from `strbuf` to `reftable_buf`</title>
<updated>2024-10-17T20:59:56Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-17T04:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be4c070a3c9e7c9d6836c724929ff8a365361e1a'/>
<id>urn:sha1:be4c070a3c9e7c9d6836c724929ff8a365361e1a</id>
<content type='text'>
Convert the reftable library to use the `reftable_buf` interface instead
of the `strbuf` interface. This is mostly a mechanical change via sed(1)
with some manual fixes where functions for `strbuf` and `reftable_buf`
differ. The converted code does not yet handle allocation failures. This
will be handled in subsequent commits.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>reftable: introduce `REFTABLE_FREE_AND_NULL()`</title>
<updated>2024-10-02T14:53:56Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-02T10:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321'/>
<id>urn:sha1:24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321</id>
<content type='text'>
We have several calls to `FREE_AND_NULL()` in the reftable library,
which of course uses free(3P). As the reftable allocators are pluggable
we should rather call the reftable specific function, which is
`reftable_free()`.

Introduce a new macro `REFTABLE_FREE_AND_NULL()` and adapt the callsites
accordingly.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: handle trivial allocation failures</title>
<updated>2024-10-02T14:53:55Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-02T10:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=12b90780667ac1e1235ec4106d94c558a28880f7'/>
<id>urn:sha1:12b90780667ac1e1235ec4106d94c558a28880f7</id>
<content type='text'>
Handle trivial allocation failures in the reftable library and its unit
tests.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable/iter: handle allocation failures when creating indexed table iter</title>
<updated>2024-10-02T14:53:54Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-02T10:56:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cc6a9af5d729c054b86455eaa9a5cf7aa3e92288'/>
<id>urn:sha1:cc6a9af5d729c054b86455eaa9a5cf7aa3e92288</id>
<content type='text'>
Handle allocation failures in `new_indexed_table_ref_iter()`. While at
it, rename the function to match our coding style.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable/reader: handle allocation failures in `reader_init_iter()`</title>
<updated>2024-10-02T14:53:53Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-02T10:55:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a8372f50924f4ee24deb6aed8361ba9e5a67f66'/>
<id>urn:sha1:0a8372f50924f4ee24deb6aed8361ba9e5a67f66</id>
<content type='text'>
Handle allocation failures in `reader_init_iter()`. This requires us to
also adapt `reftable_reader_init_*_iterator()` to bubble up the new
error codes. Adapt callers accordingly.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable/reader: handle allocation failures for unindexed reader</title>
<updated>2024-10-02T14:53:53Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-10-02T10:55:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=18da60029319733e2d931f2758a8e47b8b25b117'/>
<id>urn:sha1:18da60029319733e2d931f2758a8e47b8b25b117</id>
<content type='text'>
Handle allocation failures when creating unindexed readers.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
