Thread (63 messages) 63 messages, 5 authors, 2024-10-18

Re: [PATCH 04/10] reftable: convert from `strbuf` to `reftable_buf`

From: Patrick Steinhardt <hidden>
Date: 2024-10-14 13:09:53

On Fri, Oct 11, 2024 at 07:12:59AM -0500, karthik nayak wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
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]
quoted
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.
Well, it's basically a lie anyway that this uses sed(1), only. Some of
the functions are different between strbuf and reftable_buf, and I was
too lazy to craft an sed invocation for that.

I'll adapt the message a bit to say that this is mostly using sed, but
not really, without going into too many details.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help