diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-02 21:37:18 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-02 21:37:18 +0900 |
commit | 0903d8bbdef6c2607f2e0bf43a4d10cf54b03744 (patch) | |
tree | cfa616909c89d5830ef6c1251e7fd46bcb04edc9 /transport-helper.c | |
parent | 3f2e4c09c769dc2fbbabfcfa625451f9d98bd49a (diff) | |
parent | 876094ac16870727207e6afc0b26060101a52359 (diff) | |
download | git-0903d8bbdef6c2607f2e0bf43a4d10cf54b03744.tar.gz |
Merge branch 'ds/bundle-uri-4'
Bundle URIs part 4.
* ds/bundle-uri-4:
clone: unbundle the advertised bundles
bundle-uri: download bundles from an advertised list
bundle-uri: allow relative URLs in bundle lists
strbuf: introduce strbuf_strip_file_from_path()
bundle-uri: serve bundle.* keys from config
bundle-uri client: add helper for testing server
transport: rename got_remote_heads
bundle-uri client: add boolean transfer.bundleURI setting
clone: request the 'bundle-uri' command when available
t: create test harness for 'bundle-uri' command
protocol v2: add server-side "bundle-uri" skeleton
Diffstat (limited to 'transport-helper.c')
-rw-r--r-- | transport-helper.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c index e95267a4ab..3ea7c2bb5a 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -1267,9 +1267,22 @@ static struct ref *get_refs_list_using_list(struct transport *transport, return ret; } +static int get_bundle_uri(struct transport *transport) +{ + get_helper(transport); + + if (process_connect(transport, 0)) { + do_take_over(transport); + return transport->vtable->get_bundle_uri(transport); + } + + return -1; +} + static struct transport_vtable vtable = { .set_option = set_helper_option, .get_refs_list = get_refs_list, + .get_bundle_uri = get_bundle_uri, .fetch_refs = fetch_refs, .push_refs = push_refs, .connect = connect_helper, |