git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] transport-helper: no connection restriction in connect_helper
@ 2023-09-19  6:41 Jiang Xin
  2023-09-19  6:41 ` [PATCH 2/2] archive: support remote archive from stateless transport Jiang Xin
  2023-09-19 17:18 ` [PATCH 1/2] transport-helper: no connection restriction in connect_helper Junio C Hamano
  0 siblings, 2 replies; 61+ messages in thread
From: Jiang Xin @ 2023-09-19  6:41 UTC (permalink / raw)
  To: Git List, Junio C Hamano, Ilari Liusvaara; +Cc: Jiang Xin

From: Jiang Xin <zhiyou.jx@alibaba-inc.com>

For protocol-v2, "stateless-connection" can be used to establish a
stateless connection between the client and the server, but trying to
establish http connection by calling "transport->vtable->connect" will
fail. This restriction was first introduced in commit b236752a87
(Support remote archive from all smart transports, 2009-12-09) by
adding a limitation in the "connect_helper()" function.

Remove the restriction in the "connect_helper()" function and use the
logic in the "process_connect_service()" function to check the protocol
version and service name. By this way, we can make a connection and do
something useful. E.g., in a later commit, implements remote archive
for a repository over HTTP protocol.

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.40.1.49.g40e13c3520.dirty


^ permalink raw reply related	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2024-01-22 15:55 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19  6:41 [PATCH 1/2] transport-helper: no connection restriction in connect_helper Jiang Xin
2023-09-19  6:41 ` [PATCH 2/2] archive: support remote archive from stateless transport Jiang Xin
2023-09-19 17:18 ` [PATCH 1/2] transport-helper: no connection restriction in connect_helper Junio C Hamano
2023-09-20  0:20   ` Jiang Xin
2023-09-23 15:21   ` [PATCH v2 0/3] support remote archive from stateless transport Jiang Xin
2023-09-25 22:21     ` Junio C Hamano
2023-09-26  0:43       ` Jiang Xin
2023-09-23 15:21   ` [PATCH v2 1/3] transport-helper: no connection restriction in connect_helper Jiang Xin
2023-09-25 21:11     ` Junio C Hamano
2023-09-23 15:22   ` [PATCH v2 2/3] transport-helper: run do_take_over " Jiang Xin
2023-09-25 21:34     ` Junio C Hamano
2023-10-04 14:00       ` Jiang Xin
2023-10-04 15:21       ` [PATCH v3 0/4] support remote archive from stateless transport Jiang Xin
2023-10-04 15:21         ` [PATCH v3 1/4] transport-helper: no connection restriction in connect_helper Jiang Xin
2023-10-04 15:21         ` [PATCH v3 2/4] transport-helper: call do_take_over() in process_connect Jiang Xin
2023-10-04 18:29           ` Junio C Hamano
2023-10-04 15:21         ` [PATCH v3 3/4] transport-helper: call do_take_over() in connect_helper Jiang Xin
2023-10-04 15:21         ` [PATCH v3 4/4] archive: support remote archive from stateless transport Jiang Xin
2023-12-14 14:13         ` [PATCH v4 0/4] support remote archive via " Jiang Xin
2023-12-14 14:13           ` [PATCH v4 1/4] transport-helper: no connection restriction in connect_helper Jiang Xin
2024-01-12  7:42             ` Linus Arver
2024-01-12 21:50               ` Junio C Hamano
2024-01-16  9:04               ` Jiang Xin
2024-01-18 22:26                 ` Linus Arver
2024-01-19 10:56                   ` Jiang Xin
2024-01-20 20:25                     ` Linus Arver
2023-12-14 14:13           ` [PATCH v4 2/4] transport-helper: call do_take_over() in process_connect Jiang Xin
2023-12-14 14:13           ` [PATCH v4 3/4] transport-helper: call do_take_over() in connect_helper Jiang Xin
2024-01-12  7:56             ` Linus Arver
2024-01-16  9:41               ` Jiang Xin
2023-12-14 14:13           ` [PATCH v4 4/4] archive: support remote archive from stateless transport Jiang Xin
2024-01-12  8:12             ` Linus Arver
2024-01-16 13:39           ` [PATCH v5 0/6] support remote archive via " Jiang Xin
2024-01-16 13:39             ` [PATCH v5 1/6] transport-helper: no connection restriction in connect_helper Jiang Xin
2024-01-20 20:28               ` Linus Arver
2024-01-16 13:39             ` [PATCH v5 2/6] remote-curl: supports git-upload-archive service Jiang Xin
2024-01-20 20:30               ` Linus Arver
2024-01-16 13:39             ` [PATCH v5 3/6] transport-helper: protocol-v2 supports upload-archive Jiang Xin
2024-01-16 13:39             ` [PATCH v5 4/6] http-backend: new rpc-service for git-upload-archive Jiang Xin
2024-01-16 13:39             ` [PATCH v5 5/6] transport-helper: call do_take_over() in connect_helper Jiang Xin
2024-01-20 20:37               ` Linus Arver
2024-01-16 13:39             ` [PATCH v5 6/6] transport-helper: call do_take_over() in process_connect Jiang Xin
2024-01-20 20:43             ` [PATCH v5 0/6] support remote archive via stateless transport Linus Arver
2024-01-21  4:09               ` Jiang Xin
2024-01-21 13:15             ` [PATCH v6 " Jiang Xin
2024-01-21 13:15               ` [PATCH v6 1/6] transport-helper: no connection restriction in connect_helper Jiang Xin
2024-01-21 13:15               ` [PATCH v6 2/6] remote-curl: supports git-upload-archive service Jiang Xin
2024-01-21 13:15               ` [PATCH v6 3/6] transport-helper: protocol v2 supports upload-archive Jiang Xin
2024-01-21 13:15               ` [PATCH v6 4/6] http-backend: new rpc-service for git-upload-archive Jiang Xin
2024-01-21 13:15               ` [PATCH v6 5/6] transport-helper: call do_take_over() in connect_helper Jiang Xin
2024-01-21 13:15               ` [PATCH v6 6/6] transport-helper: call do_take_over() in process_connect Jiang Xin
2024-01-21 16:57               ` [PATCH v6 0/6] support remote archive via stateless transport Linus Arver
2024-01-22 15:54                 ` Junio C Hamano
2023-09-23 15:22   ` [PATCH v2 3/3] archive: support remote archive from " Jiang Xin
2023-09-24  6:52     ` Eric Sunshine
2023-09-24 23:39       ` Jiang Xin
2023-09-24 23:58         ` rsbecker
2023-09-25  0:15           ` Jiang Xin
2023-09-25  1:04             ` rsbecker
2023-09-24 13:41     ` Phillip Wood
2023-09-24 23:36       ` Jiang Xin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).