for protocol 30.
protocol_version = remote_protocol;
/* CVS support: fallback to finalized protocol if incompatible */
if (protocol_version >= 30) {
- int theirsub, oursub = PROTOCOL_SUBVERSION;
+ int theirsub, oursub = SUBPROTOCOL_VERSION;
if (!read_batch)
write_varint(f_out, oursub);
theirsub = read_varint(f_in);
* actual communication so far depends on whether a daemon
* is involved. */
write_int(batch_fd, protocol_version);
+ if (protocol_version >= 30) {
+ int sub = protocol_version == PROTOCOL_VERSION
+ ? SUBPROTOCOL_VERSION : 0;
+ write_varint(batch_fd, sub);
+ }
write_int(batch_fd, checksum_seed);
if (am_sender)
/* This is used when working on a new protocol version in CVS, and should
* be a new non-zero value for each CVS change that affects the protocol.
* It must ALWAYS be 0 when the protocol goes final! */
-#define PROTOCOL_SUBVERSION 1
+#define SUBPROTOCOL_VERSION 1
/* We refuse to interoperate with versions that are not in this range.
* Note that we assume we'll work with later versions: the onus is on