Re: [RFC/WIP PATCH 07/11] fetch-pack: use the configured transport protocol

2 messages, 2 authors, 2016-08-11 · open the first message on its own page

Re: [RFC/WIP PATCH 07/11] fetch-pack: use the configured transport protocol

From: Junio C Hamano <hidden>
Date: 2016-08-11 17:46:52

Stefan Beller [off-list ref] writes:
quoted hunk
@@ -175,7 +179,18 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
 		if (!conn)
 			return args.diag_url ? 0 : 1;
 	}
-	get_remote_heads(fd[0], NULL, 0, &ref, 0, NULL, &shallow);
+
+	switch (args.version) {
+	default:
+	case 2:
+		get_remote_capabilities(fd[0], NULL, 0);
+		request_capabilities(fd[1]);
+		break;
+	case 1: /* fall through */
+	case 0:
+		get_remote_heads(fd[0], NULL, 0, &ref, 0, NULL, &shallow);
+		break;
+	}

Re: [RFC/WIP PATCH 07/11] fetch-pack: use the configured transport protocol

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

On Tue, May 26, 2015 at 3:19 PM, Junio C Hamano [off-list ref] wrote:
Stefan Beller [off-list ref] writes:
quoted
@@ -175,7 +179,18 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
              if (!conn)
                      return args.diag_url ? 0 : 1;
      }
-     get_remote_heads(fd[0], NULL, 0, &ref, 0, NULL, &shallow);
+
+     switch (args.version) {
+     default:
+     case 2:
+             get_remote_capabilities(fd[0], NULL, 0);
+             request_capabilities(fd[1]);
+             break;
Actually this is wrong, we need to actually fall through from here as well,
so we not only talk capabilities negotiation, but then continue
with get_remote_heads.
quoted
+     case 1: /* fall through */
+     case 0:
+             get_remote_heads(fd[0], NULL, 0, &ref, 0, NULL, &shallow);
+             break;
+     }
Nice ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help