Re: [PATCH v2 02/10] reftable: stop using `strbuf_addf()`
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 15, 2024, 19:26 UTC
- Message-ID
- <Zw7B5Y1yUu0rt8zM@nand.local>
- In-Reply-To
- <Zw3xnFN_c7WSz1u8@pks.im>
On Tue, Oct 15, 2024 at 06:37:48AM +0200, Patrick Steinhardt wrote:
Show 11 quoted lines
> > Part of me wishes that we didn't have to write our own `reftable_buf` in > > the first place. Could we use `strbuf` as-is and expose it through a > > generic reftable-specific interface that users of reftable fill in with > > a vtable or something? > > I tried that, and it felt way worse. The amount of code you have to > write is roughly in the same ballpark, you don't have pluggable > allocators, you don't have allocation error handling and every consumer > would have to implement their own type. > > So overall it's only losses from my point of view.
Makes sense, although the end result is somewhat unsatisfying.
Thanks, Taylor