Re: [RFC/WIP PATCH 08/11] transport: connect_setup appends protocol version number

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFC/WIP PATCH 08/11] transport: connect_setup appends protocol version number

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:00

Stefan Beller [off-list ref] writes:
+	if (transport->smart_options
+	    && transport->smart_options->transport_version) {
+		buf = xmalloc(strlen(remote_program) + 12);
+		sprintf(buf, "%s-%d", remote_program,
+			transport->smart_options->transport_version);
+		remote_program = buf;
+	}
Bikeshedding: so the versioning scheme is that the current one is
zero, and the next one is two?  I would have expected that there
would be something like

	if (...->version < 2) {
        	... append "-%d" ...
	}

involved.

Re: [RFC/WIP PATCH 08/11] transport: connect_setup appends protocol version number

From: Stefan Beller <hidden>
Date: 2016-06-15 23:05:00

On Tue, May 26, 2015 at 3:21 PM, Junio C Hamano [off-list ref] wrote:
Stefan Beller [off-list ref] writes:
quoted
+     if (transport->smart_options
+         && transport->smart_options->transport_version) {
+             buf = xmalloc(strlen(remote_program) + 12);
+             sprintf(buf, "%s-%d", remote_program,
+                     transport->smart_options->transport_version);
+             remote_program = buf;
+     }
Bikeshedding: so the versioning scheme is that the current one is
zero, and the next one is two?  I would have expected that there
would be something like
I think currently we have version 1. But we don't advertise it, so
I'll call it 0
(the default or unadvertised or however you name it. 0 as in "unsure" maybe)

I thought about future proofing this version a bit. Say version 2 is bad because
I don't have the experience of 10 years Git nor of maintaining large
projects and
you want to make a version 3 soon. And this would support that just fine.

The meaning being: Any version except 0 should have a dedicated
extension -${version}
The 0 is left out for backwards compatibility.

So in a later patch where we want to introduce force-using of old
versions  you could
configure upload-pack to be explicit upload-pack-1. The upload-pack-1
version is not
yet there with this series though.
        if (...->version < 2) {
                ... append "-%d" ...
        }

involved.
Oh! I see here you would count the current one as 1, which has no
number extension,
and any further would have a -${version}. That would transport the
intention much better
I guess.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help