pub fn redact_credentials(target: &str) -> StringExpand description
Ported from RedactCredentials. Returns target safe for logging:
credentials embedded in a URL-form remote target’s userinfo are
removed, leaving scheme, host, path, and query. The whole userinfo
goes, not just the password, because tokens are commonly passed as a
bare username. Local paths are returned unchanged.