aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-05 13:21:05 +0900
committernsfisis <nsfisis@gmail.com>2026-05-05 13:21:05 +0900
commit7ee77a9e1002cc3c9e448361efe11a623bfd4fb9 (patch)
tree643d95b50c30e2334e73e831e813592b98cbc421 /crates/mozart/src/commands.rs
parent283ef7d1f4d85812dccd3b7e05441cfc05c59b4c (diff)
downloadphp-mozart-7ee77a9e1002cc3c9e448361efe11a623bfd4fb9.tar.gz
php-mozart-7ee77a9e1002cc3c9e448361efe11a623bfd4fb9.tar.zst
php-mozart-7ee77a9e1002cc3c9e448361efe11a623bfd4fb9.zip
feat(vcs): use Composer-compatible URL-sanitize cache keys
Previously each VCS mirror was keyed by sha1(url), which made cache directories opaque and incompatible with Composer's layout. Composer's GitDriver and GitDownloader both use the form Preg::replace('{[^a-z0-9.]}i', '-', Url::sanitize(\$url)), so a Mozart user migrating from Composer (or vice versa) could not share an existing cache. Reimplement GitUtil::sanitize_url to follow that pattern: redact credentials and access tokens (Url::sanitize semantics, including the GitHub token regex), then replace every byte outside [a-zA-Z0-9.] with '-'. The credential redaction also collapses URLs that differ only in their access_token to the same key.
Diffstat (limited to 'crates/mozart/src/commands.rs')
0 files changed, 0 insertions, 0 deletions