Re: [PATCH v3 01/10] connect: in ref advertisement, shallows are last

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

 



On Tue,  3 Oct 2017 13:14:58 -0700
Brandon Williams <bmwill@xxxxxxxxxx> wrote:

> +static int process_dummy_ref(void)
> +{
> +	struct object_id oid;
> +	const char *name;
> +
> +	if (parse_oid_hex(packet_buffer, &oid, &name))
> +		return 0;
> +	if (*name != ' ')
> +		return 0;
> +	name++;
> +
> +	return !oidcmp(&null_oid, &oid) && !strcmp(name, "capabilities^{}");
> +}

Nit: If you're planning to parse_oid_hex, you can strcmp with
" capabilities^{}" directly (note the space at the start) instead of
first checking for ' ' then "capabilities^{}".



[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