1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-22 17:01:08 +01:00

Merge pull request #14799 from NixOS/tarball-cache-v2

libfetchers: Bump tarball-cache version to v2
This commit is contained in:
Jörg Thalheim 2025-12-15 19:58:28 +00:00 committed by GitHub
commit 49f666c64d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1430,7 +1430,11 @@ namespace fetchers {
ref<GitRepo> Settings::getTarballCache() const ref<GitRepo> Settings::getTarballCache() const
{ {
static auto repoDir = std::filesystem::path(getCacheDir()) / "tarball-cache"; /* v1: Had either only loose objects or thin packfiles referring to loose objects
* v2: Must have only packfiles with no loose objects. Should get repacked periodically
* for optimal packfiles.
*/
static auto repoDir = std::filesystem::path(getCacheDir()) / "tarball-cache-v2";
return GitRepo::openRepo(repoDir, {.create = true, .bare = true, .packfilesOnly = true}); return GitRepo::openRepo(repoDir, {.create = true, .bare = true, .packfilesOnly = true});
} }