diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-12-22 16:14:12 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-12-25 08:24:24 +0100 |
commit | 70b9c1037325ee82bc0832f4ca2d30c6ebf4808e (patch) | |
tree | 1fc014920c20086ed0556830fab2d123e3507e38 /transport.c | |
parent | transport: rename got_remote_heads (diff) | |
download | git-70b9c1037325ee82bc0832f4ca2d30c6ebf4808e.tar.xz git-70b9c1037325ee82bc0832f4ca2d30c6ebf4808e.zip |
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 '')
-rw-r--r-- | transport.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/transport.c b/transport.c index 757ad552bf..0f35114a13 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. |