Clones from storage
A clone left through the home uplink, which is shared and slow, and a big pack cut partway failed with early EOF (#14409).
- What the forge does (
src/git/bundle_uri.ts): for each public repository it publishes a git bundle of the default branch underbundles/<owner>/<name>/<commit>.bundlein the bucket the forge backs up to (S3_*), and advertises it with git'sbundle-uricapability. It is made after a push to the default branch and on a clone's ref advertisement when missing or behind, one build per repository, none more often than a minute, and two at once at most across the forge. The newest and the one before it are kept, the one before only while it is part of the new history (a force-push drops it). - Taking it back: a repository that goes private, is renamed, moved or deleted has every object under its
bundles/<owner>/<name>/deleted from the bucket and itsforge-bundle.jsonremoved first, since the bucket is publicly readable. - To turn it on: set
FORGE_BUNDLE_BASE_URLto the address the bucket (or a CDN in front of it) is read from without credentials, and makebundles/publicly readable there. Unset, nothing is published or advertised. A private repository is never bundled or advertised. - For a client (git 2.38+):
git -c transfer.bundleURI=true clone <url>downloads the bundle from storage, then fetches only what is newer from the forge. git does not ask for bundles unless told to; a client that does not clones whole from the forge as before. - On a slow link without that:
git clone --filter=blob:none <url>, one sentence and a copy field on the repository page, and aclone (slow link)line in the terminal's repository About. - Not done: the uplink shaper's priority for git over model traffic is host configuration (
docs/features/bottleneck.md), not in this repository; a bundle is the default branch only, so other branches come from the forge; a private repository's bundle would need signed addresses.