Re: [PATCH 04/10] reftable: convert from `strbuf` to `reftable_buf`
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Oct 11, 2024, 12:12 UTC
- Message-ID
- <CAOLa=ZTOVGNxqJq0mj9GuLFqa6mVHp7WOkhuQsgiW79OKhhyNg@mail.gmail.com>
- In-Reply-To
- <e2ac27dbca0956bc231ad2a866bd796170deacf4.1728629612.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> Convert the reftable library to use the `reftable_buf` interface instead > of the `strbuf` interface. This is a mechanical change via sed(1) and > does not yet handle allocation failures. These will be addressed in > subsequent commits. >
Nit: Would be nice to list the sed command used here, so reviewers can review that instead.
[snip]
Show 9 quoted lines
> diff --git a/reftable/basics.h b/reftable/basics.h > index 4cf3f0e7593..ac3100417ec 100644 > --- a/reftable/basics.h > +++ b/reftable/basics.h > @@ -104,8 +104,7 @@ char *reftable_strdup(const char *str); > #endif > > /* Find the longest shared prefix size of `a` and `b` */ > -struct strbuf;
I guess this is the only manual part of this commit, would be nice to mention this in the message.
Show 5 quoted lines
> -int common_prefix_size(struct strbuf *a, struct strbuf *b); > +int common_prefix_size(struct reftable_buf *a, struct reftable_buf *b); > > int hash_size(uint32_t id); >
[snip]