pub fn apply(aliases: &Aliases, url: &str) -> StringExpand description
Pure function: given a built alias map and a URL, do the longest-
prefix-match rewrite. Split out so unit tests don’t need a temp
repo, and exposed so callers that already hold an Aliases map
(e.g. the transfer queue, which captures the map once at startup
instead of re-locking the per-call cache) can apply it directly.