Parent
[>]
1//! Route handlers for repository pages. 2//! 3//! Covers two routes: the repository list (`/`) and the repository detail 4//! page (`/{repo}`). The detail handler opens the repository with `gix`, 5//! collects branch and tag summaries via the service layer, reads the 6//! description from `.git/description`, and renders the README as HTML. 7 8use Template; 9use WebTemplate; 10use State; 11use IntoResponse; 12 13use ; 14 15use crateResult; 16use crate; 17use crate; 18 19/// Reads the repository description from `.git/description`, returning `None` 20/// if the file is missing, empty, or contains the default git placeholder text. 21 27 28/// Returns `true` if `url` is a relative path that should be rewritten to 29/// point at the raw file serving route. 30 37 38/// Template context for the repository detail page. 39 40 41 51 52/// Renders the detail page for a single repository, including its branches, 53/// tags, and description. Returns [`Error::RepoNotFound`] if no repository 54/// exists at the given name, or [`Error::GitCorrupt`] if the ref database 55/// cannot be read. 56pub async 171 172/// Template context for a single repository in the list. 173 179 180/// Template context for the repository list page. 181 182 183 186 187/// Renders the repository list page by scanning the root directory for git 188/// repositories. Entries that cannot be opened as a git repository are 189/// skipped. The list is sorted by latest commit first. 190pub async