1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-16 05:51:05 +01:00

Merge branch 'path-info' into ca-drv-exotic

This commit is contained in:
John Ericson 2023-01-14 17:09:58 -05:00
commit 7c82213813
97 changed files with 1868 additions and 1001 deletions

View file

@ -208,6 +208,16 @@ Hash getContentAddressHash(const ContentAddress & ca)
}, ca);
}
bool StoreReferences::empty() const
{
return !self && others.empty();
}
size_t StoreReferences::size() const
{
return (self ? 1 : 0) + others.size();
}
ContentAddressWithReferences caWithoutRefs(const ContentAddress & ca) {
return std::visit(overloaded {
[&](const TextHash & h) -> ContentAddressWithReferences {