Message ID | f3fef46c058968f6d0ad5a48776bd2f59ab45868.1705411391.git.zhiyou.jx@alibaba-inc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | support remote archive via stateless transport | expand |
Jiang Xin <worldhello.net@gmail.com> writes: > Remove the restriction in the "connect_helper()" function and give the > function "process_connect_service()" the opportunity to establish a > connection using ".connect" or ".stateless_connect" for protocol v2. So > we can connect with a stateless-rpc and do something useful. E.g., in a > later commit, implements remote archive for a repository over HTTP > protocol. Nit: Perhaps add something like the following for the commit message? Removing the restriction does not change behavior, because process_connect_service() will return 0 if both data->connect and data->stateless_connect are false, and we'll still die() early. > Helped-by: Junio C Hamano <gitster@pobox.com> > Helped-by: Linus Arver <linusa@google.com> > Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> > --- > transport-helper.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/transport-helper.c b/transport-helper.c > index 49811ef176..2e127d24a5 100644 > --- a/transport-helper.c > +++ b/transport-helper.c > @@ -662,8 +662,6 @@ static int connect_helper(struct transport *transport, const char *name, > > /* Get_helper so connect is inited. */ > get_helper(transport); > - if (!data->connect) > - die(_("operation not supported by protocol")); > > if (!process_connect_service(transport, name, exec)) > die(_("can't connect to subservice %s"), name); > -- > 2.43.0
diff --git a/transport-helper.c b/transport-helper.c index 49811ef176..2e127d24a5 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -662,8 +662,6 @@ static int connect_helper(struct transport *transport, const char *name, /* Get_helper so connect is inited. */ get_helper(transport); - if (!data->connect) - die(_("operation not supported by protocol")); if (!process_connect_service(transport, name, exec)) die(_("can't connect to subservice %s"), name);