pub struct GitUrl {
pub host: Option<String>,
pub name: String,
pub owner: Option<String>,
pub organization: Option<String>,
pub fullname: String,
pub scheme: Scheme,
pub user: Option<String>,
pub token: Option<String>,
pub port: Option<u16>,
pub path: String,
pub git_suffix: bool,
pub scheme_prefix: bool,
}Expand description
GitUrl represents an input URL used by git hosting tools and repositories.
Parsing normalizes the input first, then uses the url crate for the
generic URL handling before extracting Git-specific metadata.
Fields§
§host: Option<String>The fully qualified domain name (FQDN) or IP address of the repository.
name: StringThe repository name with any trailing .git suffix removed.
owner: Option<String>The owner, account, or project segment directly associated with name.
organization: Option<String>The organization segment when the host encodes one explicitly.
Azure DevOps URLs currently populate this field.
fullname: StringThe canonical repository path assembled from the extracted metadata.
scheme: SchemeThe parsed transport or file scheme.
user: Option<String>The authentication username embedded in the input URL.
token: Option<String>The password or token component embedded in the input URL.
port: Option<u16>The explicit port number when one is present.
path: StringThe normalized path portion relative to the host and auth fields.
git_suffix: boolWhether the original path ended with .git.
scheme_prefix: boolWhether the original input explicitly spelled out its URL scheme.