Skip to main content

discover_repository_structure

Function discover_repository_structure 

Source
pub fn discover_repository_structure(
    path: &Path,
) -> FsResult<RepositoryStructure>
Expand description

Discover one repository structure without starting Git or mutating the filesystem.

The nearest containing worktree wins for nested paths. If the supplied path is inside a common control directory, discovery returns manager selection instead of treating Git metadata as source. A true non-Git path remains that exact path.

ยงErrors

Returns an error when the selected directory cannot be canonicalized, filesystem metadata cannot be read, or the bounded registration inventory is exceeded.