public final class CloneUrlIdentity
extends java.lang.Object
Derives an owner/repo-shaped identity from an arbitrary git clone URL, for use as a
cache-directory or cached-jar-file naming key only; never used to construct the actual clone
URL.
- Implementation Note:
owner carries a hash of the full URL (the same technique UrlDownloads uses for its download cache key), so two different hosts, or two different
credentials on the same host, that happen to share an owner/repo-shaped path never derive the
same identity: a git-existence check on a checkout directory has no way to compare its origin remote back against the URL that was requested. The URL is redacted before any segment
of it becomes part of the identity, so a credential embedded in it (userinfo, a query token)
can never land in a directory or file name; each segment is further sanitized against
characters a filesystem path cannot contain (a raw host:port embeds a :, which
also breaks mkdirs confusingly on Windows).