summaryrefslogtreecommitdiff
path: root/connected.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-06-25 12:27:47 -0700
committerJunio C Hamano <gitster@pobox.com>2020-06-25 12:27:47 -0700
commit34e849b05a454a2c6487f8fbfa68c39932d22730 (patch)
tree7a71a357e9f7e2c977849224ca18b2cb9a4461ea /connected.c
parent10462829e35d1a88ef89be0465a5ee9fd229dc3a (diff)
parentcae2ee105505d45a92cf7abcc26f22890bce4202 (diff)
downloadgit-34e849b05a454a2c6487f8fbfa68c39932d22730.tar.gz
Merge branch 'jt/cdn-offload'
The "fetch/clone" protocol has been updated to allow the server to instruct the clients to grab pre-packaged packfile(s) in addition to the packed object data coming over the wire. * jt/cdn-offload: upload-pack: fix a sparse '0 as NULL pointer' warning upload-pack: send part of packfile response as uri fetch-pack: support more than one pack lockfile upload-pack: refactor reading of pack-objects out Documentation: add Packfile URIs design doc Documentation: order protocol v2 sections http-fetch: support fetching packfiles by URL http-fetch: refactor into function http: refactor finish_http_pack_request() http: use --stdin when indexing dumb HTTP pack
Diffstat (limited to 'connected.c')
-rw-r--r--connected.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/connected.c b/connected.c
index 3135b71e19..937b4bae38 100644
--- a/connected.c
+++ b/connected.c
@@ -43,10 +43,12 @@ int check_connected(oid_iterate_fn fn, void *cb_data,
if (transport && transport->smart_options &&
transport->smart_options->self_contained_and_connected &&
- transport->pack_lockfile &&
- strip_suffix(transport->pack_lockfile, ".keep", &base_len)) {
+ transport->pack_lockfiles.nr == 1 &&
+ strip_suffix(transport->pack_lockfiles.items[0].string,
+ ".keep", &base_len)) {
struct strbuf idx_file = STRBUF_INIT;
- strbuf_add(&idx_file, transport->pack_lockfile, base_len);
+ strbuf_add(&idx_file, transport->pack_lockfiles.items[0].string,
+ base_len);
strbuf_addstr(&idx_file, ".idx");
new_pack = add_packed_git(idx_file.buf, idx_file.len, 1);
strbuf_release(&idx_file);