summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-12-22 15:14:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-12-25 07:24:24 (GMT)
commit70b9c1037325ee82bc0832f4ca2d30c6ebf4808e (patch)
tree1fc014920c20086ed0556830fab2d123e3507e38 /transport.c
parent1b759e0cf1c18c637e40c6c191a0b614e4e4ea43 (diff)
downloadgit-70b9c1037325ee82bc0832f4ca2d30c6ebf4808e.zip
git-70b9c1037325ee82bc0832f4ca2d30c6ebf4808e.tar.gz
git-70b9c1037325ee82bc0832f4ca2d30c6ebf4808e.tar.bz2
bundle-uri client: add helper for testing server
Add a 'test-tool bundle-uri ls-remote' command. This is a thin wrapper for issuing protocol v2 "bundle-uri" commands to a server, and to the parsing routines in bundle-uri.c. In the "git clone" case we'll have already done the handshake(), but not here. Add an extra case to check for this handshake in get_bundle_uri() for ease of use for future callers. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index 757ad55..0f35114 100644
--- a/transport.c
+++ b/transport.c
@@ -371,6 +371,13 @@ static int get_bundle_uri(struct transport *transport)
init_bundle_list(transport->bundles);
}
+ if (!data->finished_handshake) {
+ struct ref *refs = handshake(transport, 0, NULL, 0);
+
+ if (refs)
+ free_refs(refs);
+ }
+
/*
* "Support" protocol v0 and v2 without bundle-uri support by
* silently degrading to a NOOP.