uv/crates/uv-cache-info/src
Sergei Nizovtsev 051aaa5fe5
Fix git-tag cache-key reader in case of slashes (#10467) (#10500)
## Summary

The assumption that all tags are listed under a flat `.git/ref/tags`
structure was wrong. Git creates a hierarchy of directories for tags
containing slashes. To fix the cache key calculation, we need to
recursively traverse all files under that folder instead.

## Test Plan

1. Create an `uv` project with git-tag cache-keys;
2. Add any tag with slash;
3. Run `uv sync` and see uv_cache_info error in verbose log;
4. `uv sync` doesn't trigger reinstall on next tag addition or removal;
5. With fix applied, reinstall triggers on every tag update and there
are no errors in the log.

Fixes #10467

---------

Co-authored-by: Sergei Nizovtsev <sergei.nizovtsev@eqvilent.com>
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-01-11 21:30:46 -05:00
..
cache_info.rs Allow environment variables to be included in cache keys (#10170) 2024-12-26 15:31:49 +00:00
git_info.rs Fix git-tag cache-key reader in case of slashes (#10467) (#10500) 2025-01-11 21:30:46 -05:00
lib.rs Allow users to incorporate Git tags into dynamic cache keys (#8259) 2024-10-16 11:13:29 -04:00
timestamp.rs Add support for dynamic cache keys (#7136) 2024-09-09 20:19:15 +00:00