Re: [PATCH v2 1/1] upload-pack: advertise capabilities when cloning empty repos

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

 



Jeff King <peff@xxxxxxxx> writes:

> @@ -1382,8 +1386,10 @@ void upload_pack(const int advertise_refs, const int stateless_rpc,
>  			data.no_done = 1;
>  		head_ref_namespaced(send_ref, &data);
>  		for_each_namespaced_ref(send_ref, &data);
> -		if (!data.sent_capabilities)
> -			send_ref("capabilities^{}", null_oid(), 0, &data);
> +		if (!data.sent_capabilities) {
> +			const char *ref = "capabilities^{}";
> +			write_v0_ref(&data, ref, ref, null_oid());
> +		}

Ah, this separation of duties wrt the namespace stripping makes the
result easier to read.

The version brian posted looked good enough to me, but if we are to
have another iteration, incorporating this change would be nice.

Thanks.




[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