pub struct RepositoryLayout {
pub root: PathBuf,
pub root_is_repo: bool,
pub submodule_paths: Vec<PathBuf>,
pub nested_repos: Vec<PathBuf>,
}Expand description
Summary of the git-repository shape under a selected scan root.
Used to warn when a user points oxide-sloc at a folder that holds several
independent repositories (e.g. a projects/ directory of separate clones),
which silently conflates unrelated codebases and their git metrics. A single
repository that contains git submodules is legitimate and does not count as
“multiple repos”.
Fields§
§root: PathBufThe scan root this layout was computed for.
root_is_repo: booltrue when the root directory is itself the top of a git repository.
submodule_paths: Vec<PathBuf>Submodule paths declared in the root’s .gitmodules, relative to root.
nested_repos: Vec<PathBuf>Independent (non-submodule) repositories found beneath root, relative to root.
Implementations§
Source§impl RepositoryLayout
impl RepositoryLayout
Sourcepub const fn has_multiple_repos(&self) -> bool
pub const fn has_multiple_repos(&self) -> bool
true when the selection spans more than one independent repository.
If the root is itself a repo, any nested non-submodule repo is a foreign checkout vendored inside it. If the root is not a repo, two or more child repos means the user picked a parent-of-repos folder.
Trait Implementations§
Source§impl Clone for RepositoryLayout
impl Clone for RepositoryLayout
Source§fn clone(&self) -> RepositoryLayout
fn clone(&self) -> RepositoryLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more