On Sun, Jan 27, 2019 at 11:41:26AM -0800, [email protected] wrote:
> diff --git a/metacommit.c b/metacommit.c
> +static void compute_change_name(struct commit *initial_commit, struct
> strbuf* result)
> +{
> + struct strbuf default_name;
> + struct object_id unused;
> +
> + strbuf_init(&default_name, 0);
> + if (initial_commit) {
> + compute_default_change_name(initial_commit, &default_name);
> + } else {
> + strbuf_addstr(&default_name, "change");
> + }
> + strbuf_addstr(result, "refs/metas/");
> + strbuf_addstr(result, default_name.buf);
Please use the slightly more efficient strbuf_addbuf() function
instead.