Skip to main content

repos

Function repos 

Source
pub fn repos(root: &Path) -> Result<Vec<String>, String>
Expand description

Bare repositories under root, as owner/name.git paths.

Public because the export is not the only caller that needs to know what is actually on disk. Startup needs it too: a repository can arrive without ever being named in --create — restored from a bundle, or created against a running node — and one that is served without being adopted is served with no pre-receive hook, which means every push into it bypasses the sequencer.

A directory counts as a repository when its name ends .git and it holds a HEAD file, so a half-written directory is not mistaken for one. .choir is skipped, and symlinks are never followed: a link out of the root would otherwise let an export copy, or a startup adopt, whatever it pointed at.

§Errors

Returns a description when a directory under root cannot be read.