pub fn validate_git_url(url: &str) -> Result<(), PackageError>Expand description
Validate a Git remote URL’s scheme and basic shape (no network access).
Accepted forms:
- SCP-like
git@host:org/repo(no scheme), - URL forms with scheme
https,http,git, orssh, - Local repository paths (an absolute path on the current platform, e.g.
/abs/pathon Unix orC:\abs\pathon Windows, plus./rel,../rel,~/path), whichgit cloneaccepts directly and are used by offline/hermetic tests.
The URL/reference must be non-empty. A bare host with no scheme and no path
separator (e.g. github.com/org/repo without a scheme) is rejected as an
invalid URL. This is a syntax/shape check only — no network connection is
made.