Expand description
Request-path -> (upstream URL, on-disk cache dir) resolution, hardened against path traversal.
Structs§
- RepoRef
- A resolved repository: where to fetch it from and where it is cached.
Constants§
- EVICTING_
SUFFIX - Reserved suffix for the trash directory a mirror is renamed to during eviction
before its (possibly slow) removal (see
git::GitCache::evict). Reserved for the same reason asINCOMING_SUFFIX: a client path must never alias a mirror mid-eviction. - INCOMING_
SUFFIX - Reserved suffix for the staging directory a mirror is cloned into before its
atomic rename into place (see
git::clone_mirror).resolverejects any client path containing it, so a request can never resolve onto another repo’s in-flight clone directory.
Functions§
- repo_
name_ from_ path - Strip a smart-HTTP endpoint suffix (
/info/refs,/git-upload-pack) from a request path and return the repo name.Noneif the suffix isn’t present. - resolve
- Validate a repo path (no traversal / absolute / NUL) and resolve it against the upstream base and cache root.