* Initial plan
* Add garbage collection for old content-addressed askpass directories
- Implement updateDirectoryMtime to update folder mtime when used
- Add garbageCollectOldDirectories to remove folders older than 7 days
- Update ensureAskpassScripts to call GC on every activation
- Add comprehensive test coverage for GC functionality
Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
* Remove GC from fast path to keep it fast
Only run garbage collection when creating new directories, not when reusing existing ones. Old folders only accumulate when creating new content-addressed directories.
Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
* Hoist askpassBaseDir variable to avoid duplication
Declare askpassBaseDir once at the top of the function and reuse it when constructing askpassDir and when calling garbageCollectOldDirectories.
Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
* Fix test failures and address bot review comments
- Export ensureAskpassScripts for testing to avoid dependency on isWindowsUserOrSystemSetup check
- Remove redundant success log after directory removal
- Update tests to call ensureAskpassScripts directly instead of getAskpassPaths
- Remove Windows-only restrictions from tests to make them cross-platform
- Remove setTimeout workarounds - tests now properly await async operations
Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
* formatting
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
* Maintain a cache of repo remotes that we know about
Part of #271101
* Save workspace file or folder instead of repo root path
* PR feedback
- Rename to repositoryCache
- Remove timestamp
- Move logic into repo cache
- Fix tests
* Name changes
* Actually delete
* Fix change that got lost in the rename
* Git - cleanup getRemotes()
* Remove test for read-only remote as the code to determine that a remote is read-only has been moved out of the function that does the parsing