#[non_exhaustive]pub struct Submodule {
pub name: String,
pub path: PathBuf,
pub url: String,
pub branch: Option<String>,
}Expand description
One submodule declared in the superproject’s .gitmodules, parsed from the
machine-unambiguous git config --file .gitmodules --list -z source rather
than a hand-rolled text scan of the ini-style file.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe subsection name — the quoted key in [submodule "<name>"]. Usually
equal to path, but git allows the two to differ (a
renamed submodule keeps its original section name), so it is captured
separately.
path: PathBufsubmodule.<name>.path — the repo-relative mount point of the submodule.
A PathBuf built from the raw config bytes (via
vcs_diff::path_from_bytes), so a path that is not valid UTF-8 (legal
on Unix) is carried losslessly, matching StatusEntry::path.
url: Stringsubmodule.<name>.url — the upstream the submodule is fetched from.
Empty when the entry declares no url (a malformed .gitmodules).
branch: Option<String>submodule.<name>.branch, the tracked branch for
git submodule update --remote; None when unset.