aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-vcs/tests/git_driver_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-05 13:17:15 +0900
committernsfisis <nsfisis@gmail.com>2026-05-05 13:17:15 +0900
commit283ef7d1f4d85812dccd3b7e05441cfc05c59b4c (patch)
treefb84815c2569eab5da2a19d2b3f1a2f096cc9273 /crates/mozart-vcs/tests/git_driver_test.rs
parenta10adb3b9ff3e1fe7ae0b8dc6440f171dde5f0ab (diff)
downloadphp-mozart-283ef7d1f4d85812dccd3b7e05441cfc05c59b4c.tar.gz
php-mozart-283ef7d1f4d85812dccd3b7e05441cfc05c59b4c.tar.zst
php-mozart-283ef7d1f4d85812dccd3b7e05441cfc05c59b4c.zip
feat(vcs): wire cache-vcs-dir setting through to drivers
DriverConfig used to expose a generic cache_dir hardcoded to a relative ".cache/mozart/vcs", with each driver appending its own "git"/"hg" subdir. As a result, the cache-vcs-dir setting (and COMPOSER_CACHE_VCS_DIR env var) had no effect on where mirrors were actually stored. Replace cache_dir with cache_vcs_dir, resolving its default the same way Composer does (COMPOSER_CACHE_VCS_DIR → COMPOSER_CACHE_DIR/vcs → XDG/HOME fallbacks), and have GitDriver/HgDriver use it directly. This brings the Mozart cache layout in line with Composer's: a single shared vcs root with one subdirectory per sanitized URL.
Diffstat (limited to 'crates/mozart-vcs/tests/git_driver_test.rs')
-rw-r--r--crates/mozart-vcs/tests/git_driver_test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart-vcs/tests/git_driver_test.rs b/crates/mozart-vcs/tests/git_driver_test.rs
index a8f0ce7..04b224b 100644
--- a/crates/mozart-vcs/tests/git_driver_test.rs
+++ b/crates/mozart-vcs/tests/git_driver_test.rs
@@ -77,7 +77,7 @@ async fn test_git_driver_local_repo() {
create_test_repo(repo_dir.path());
let config = DriverConfig {
- cache_dir: cache_dir.path().to_path_buf(),
+ cache_vcs_dir: cache_dir.path().to_path_buf(),
..DriverConfig::default()
};
@@ -237,7 +237,7 @@ async fn test_vcs_repository_scan() {
create_test_repo(repo_dir.path());
let config = DriverConfig {
- cache_dir: cache_dir.path().to_path_buf(),
+ cache_vcs_dir: cache_dir.path().to_path_buf(),
..DriverConfig::default()
};