Re: [PATCH v2 6/8] evolve: Add support for writing metacommits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 27, 2019 at 11:41:26AM -0800, sxenos@xxxxxxxxxx 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux