Re: [PATCH v2 5/9] upload-pack, receive-pack: introduce protocol version 1

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

 



Brandon Williams <bmwill@xxxxxxxxxx> writes:

> @@ -1963,6 +1964,19 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
>  	else if (0 <= receive_unpack_limit)
>  		unpack_limit = receive_unpack_limit;
>  
> +	switch (determine_protocol_version_server()) {
> +	case protocol_v1:
> +		if (advertise_refs || !stateless_rpc)
> +			packet_write_fmt(1, "version 1\n");
> +		/*
> +		 * v1 is just the original protocol with a version string,
> +		 * so just fall through after writing the version string.
> +		 */
> +	case protocol_v0:
> +	default:
> +		break;

When protocol_v2 is introduced in the other part of the codebase
(i.e. in protocol.[ch]), until these lines are updated accordingly
to take care of the new protocol, we'd pretend that client asked
(and the server accepted) v0, even though the client and the daemon
agreed to talk v2.

Shouldn't the "default:" die instead?  The same for upload-pack.c



[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