diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-06-25 12:27:47 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-06-25 12:27:47 -0700 |
| commit | 34e849b05a454a2c6487f8fbfa68c39932d22730 (patch) | |
| tree | 7a71a357e9f7e2c977849224ca18b2cb9a4461ea /http-walker.c | |
| parent | Merge branch 'ss/submodule-set-branch-in-c' (diff) | |
| parent | upload-pack: fix a sparse '0 as NULL pointer' warning (diff) | |
| download | git-34e849b05a454a2c6487f8fbfa68c39932d22730.tar.gz git-34e849b05a454a2c6487f8fbfa68c39932d22730.zip | |
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 'http-walker.c')
| -rw-r--r-- | http-walker.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/http-walker.c b/http-walker.c index fe15e325fa..4fb1235cd4 100644 --- a/http-walker.c +++ b/http-walker.c @@ -439,6 +439,7 @@ static int http_fetch_pack(struct walker *walker, struct alt_base *repo, unsigne target = find_sha1_pack(sha1, repo->packs); if (!target) return -1; + close_pack_index(target); if (walker->get_verbosely) { fprintf(stderr, "Getting pack %s\n", @@ -447,10 +448,9 @@ static int http_fetch_pack(struct walker *walker, struct alt_base *repo, unsigne hash_to_hex(sha1)); } - preq = new_http_pack_request(target, repo->base); + preq = new_http_pack_request(target->hash, repo->base); if (preq == NULL) goto abort; - preq->lst = &repo->packs; preq->slot->results = &results; if (start_active_slot(preq->slot)) { @@ -469,6 +469,7 @@ static int http_fetch_pack(struct walker *walker, struct alt_base *repo, unsigne release_http_pack_request(preq); if (ret) return ret; + http_install_packfile(target, &repo->packs); return 0; |
