Skip to content

CDN offloading update

Jonathan Tan git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 8 repliesIn review
  2. v18 patches 17 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9http: use --stdin when indexing dumb HTTP packhttp.c+11 -221 reply
2/9http: refactor finish_http_pack_request()http-push.c http-walker.c http.c +1 more+35 -220 replies
3/9http-fetch: refactor into functionhttp-fetch.c+41 -280 replies
4/9http-fetch: support fetching packfiles by URLDocumentation/git-http-fetch.txt http-fetch.c http.c +2 more+123 -181 reply
5/9Documentation: order protocol v2 sectionsDocumentation/technical/protocol-v2.txt+8 -100 replies
6/9Documentation: add Packfile URIs design docDocumentation/technical/packfile-uri.txt Documentation/technical/protocol-v2.txt+109 -14 replies
7/9upload-pack: refactor reading of pack-objects outupload-pack.c+49 -350 replies
8/9fetch-pack: support more than one pack lockfilebuiltin/fetch-pack.c connected.c fetch-pack.c +4 more+46 -351 reply
9/9upload-pack: send part of packfile response as uribuiltin/pack-objects.c fetch-pack.c t/t5702-protocol-v2.sh +1 more+343 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/9] CDN offloading update

Thanks, Junio, for taking a look at this.

This version is based on cc/upload-pack-data-2. I thought of retaining the base from the original version, but trying out the rebase showed that there were some code movements that would clutter the range-diff anyway, so I went ahead with the rebase.

I tried to avoid the need for the first patch, but it turns out that index-pack can operate with custom names for .pack and .idx (".pack.temp" and ".idx.temp", as used by http-fetch) but not .keep, and we need .keep, so changing to --stdin instead of using custom names is necessary anyway. I've updated the commit message to use that justification.

The main change is Junio's suggestion [1] to refactor into smaller functions. Quoting from [1]:

Quoted 8 lines

- Whether we are fetching a single packfile from a URL, or walking to fetch all the packfiles in the repository at a given URL

- Whether packfiles taken from outer space are marked with the "keep" bit

- Whether the obtained packfile(s) are internally "installed" to the running process

To which we can add:

4. Whether to close the index mmap
5. Whether to delete the packfile from the given list

The 3rd, 4th, and 5th concerns were refactored in patch 2, and the others were refactored in patch 4.

I also updated the documentation to hopefully make it clearer that the client should download all packfiles, including the inline packfile, before performing the connectivity check.

[1] https://lore.kernel.org/git/[email protected]/

Jonathan Tan (9):
http: use --stdin when indexing dumb HTTP pack
http: refactor finish_http_pack_request()
http-fetch: refactor into function
http-fetch: support fetching packfiles by URL
Documentation: order protocol v2 sections
Documentation: add Packfile URIs design doc
upload-pack: refactor reading of pack-objects out
fetch-pack: support more than one pack lockfile
upload-pack: send part of packfile response as uri

 Documentation/git-http-fetch.txt         |   9 +-
 Documentation/technical/packfile-uri.txt |  78 +++++++++++
 Documentation/technical/protocol-v2.txt  |  48 +++++--
 builtin/fetch-pack.c                     |  17 ++-
 builtin/pack-objects.c                   |  76 +++++++++++
 connected.c                              |   8 +-
 fetch-pack.c                             | 137 +++++++++++++++++---
 fetch-pack.h                             |   2 +-
 http-fetch.c                             | 126 +++++++++++++-----
 http-push.c                              |   8 +-
 http-walker.c                            |   5 +-
 http.c                                   |  82 ++++++------
 http.h                                   |  24 +++-
 t/t5550-http-fetch-dumb.sh               |  30 +++++
 t/t5702-protocol-v2.sh                   |  88 +++++++++++++
 transport-helper.c                       |   5 +-
 transport.c                              |  14 +-
 transport.h                              |   6 +-
 upload-pack.c                            | 157 +++++++++++++++++------
 19 files changed, 752 insertions(+), 168 deletions(-)
 create mode 100644 Documentation/technical/packfile-uri.txt
Signature · 1 line
2.27.0.278.ge193c7cf3a9-goog