mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
clone: request the 'bundle-uri' command when available
Set up all the needed client parts of the 'bundle-uri' protocol v2 command, without actually doing anything with the bundle URIs. If the server says it supports 'bundle-uri' teach Git to issue the 'bundle-uri' command after the 'ls-refs' during 'git clone'. The returned key=value pairs are passed to the bundle list code which is tested using a different ingest mechanism in t5750-bundle-uri-parse.sh. At this point, Git does nothing with that bundle list. It will not download any of the bundles. That will come in a later change after these protocol bits are finalized. The no-op client is initially used only by 'git clone' to test the basic functionality, and eventually will bootstrap the initial download of Git objects during a fresh clone. The bundle URI client will not be integrated into other fetches until a mechanism is created to select a subset of bundles for download. 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>
This commit is contained in:
committed by
Junio C Hamano
parent
8f788eb8b7
commit
0cfde740f0
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user