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:
commit
49f666c64d
1 changed files with 5 additions and 1 deletions
|
|
@ -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});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue