On Mon, Oct 14, 2024 at 03:02:19PM +0200, Patrick Steinhardt wrote: > We're about to introduce our own `reftable_buf` type to replace > `strbuf`. Get rid of the seldomly-used `strbuf_addbuf()` function such > that we have to reimplement one less function. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- > reftable/block.c | 2 +- > reftable/record.c | 6 +++--- > reftable/writer.c | 7 ++++--- > 3 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/reftable/block.c b/reftable/block.c > index 8d41a2f99ed..cd4180eac7b 100644 > --- a/reftable/block.c > +++ b/reftable/block.c > @@ -60,7 +60,7 @@ static int block_writer_register_restart(struct block_writer *w, int n, > w->next += n; > > strbuf_reset(&w->last_key); > - strbuf_addbuf(&w->last_key, key); > + strbuf_add(&w->last_key, key->buf, key->len); > w->entries++; > return 0; > } OK, this makes sense. FWIW, it feels like this would have been an easy function to port over to the new 'reftable_buf' type. But I understand wanting to implement fewer functions if possible. Thanks, Taylor