reftable: convert from strbuf to reftable_buf

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 <ps@pks.im>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
This commit is contained in:
Patrick Steinhardt
2024-10-17 06:53:56 +02:00
committed by Taylor Blau
parent 81eddda540
commit be4c070a3c
24 changed files with 374 additions and 371 deletions

View File

@ -260,7 +260,7 @@ int names_equal(const char **a, const char **b)
return a[i] == b[i];
}
int common_prefix_size(struct strbuf *a, struct strbuf *b)
int common_prefix_size(struct reftable_buf *a, struct reftable_buf *b)
{
int p = 0;
for (; p < a->len && p < b->len; p++) {