Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> --- transport.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/transport.c b/transport.c index 3ef15f6..33644a6 100644 --- a/transport.c +++ b/transport.c @@ -496,15 +496,29 @@ static int set_git_option(struct git_transport_options *opts, static int connect_setup(struct transport *transport, int for_push, int verbose) { struct git_transport_data *data = transport->data; + const char *remote_program; + char *buf = 0; if (data->conn) return 0; + remote_program = (for_push ? data->options.receivepack + : data->options.uploadpack); + + 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; + } + data->conn = git_connect(data->fd, transport->url, - for_push ? data->options.receivepack : - data->options.uploadpack, + remote_program, verbose ? CONNECT_VERBOSE : 0); + free(buf); + return 0; } -- 2.4.1.345.gab207b6.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html