Skip to main content

Module repo

Module repo 

Source
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.

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. None if the suffix isn’t present.
resolve
Validate a repo path (no traversal / absolute / NUL) and resolve it against the upstream base and cache root.