mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Merge remote-tracking branch 'upstream/master' into path-info
This commit is contained in:
commit
13b6b64589
24 changed files with 632 additions and 100 deletions
|
@ -208,10 +208,10 @@ StorePath Store::makeFixedOutputPathFromCA(const StorePathDescriptor & desc) con
|
|||
{
|
||||
// New template
|
||||
return std::visit(overloaded {
|
||||
[&](TextInfo ti) {
|
||||
[&](const TextInfo & ti) {
|
||||
return makeTextPath(desc.name, ti);
|
||||
},
|
||||
[&](FixedOutputInfo foi) {
|
||||
[&](const FixedOutputInfo & foi) {
|
||||
return makeFixedOutputPath(desc.name, foi);
|
||||
}
|
||||
}, desc.info);
|
||||
|
@ -1150,13 +1150,13 @@ std::optional<StorePathDescriptor> ValidPathInfo::fullStorePathDescriptorOpt() c
|
|||
return StorePathDescriptor {
|
||||
.name = std::string { path.name() },
|
||||
.info = std::visit(overloaded {
|
||||
[&](TextHash th) {
|
||||
[&](const TextHash & th) {
|
||||
TextInfo info { th };
|
||||
assert(!hasSelfReference);
|
||||
info.references = references;
|
||||
return ContentAddressWithReferences { info };
|
||||
},
|
||||
[&](FixedOutputHash foh) {
|
||||
[&](const FixedOutputHash & foh) {
|
||||
FixedOutputInfo info { foh };
|
||||
info.references = static_cast<PathReferences<StorePath>>(*this);
|
||||
return ContentAddressWithReferences { info };
|
||||
|
@ -1218,11 +1218,11 @@ ValidPathInfo::ValidPathInfo(
|
|||
, narHash(narHash)
|
||||
{
|
||||
std::visit(overloaded {
|
||||
[this](TextInfo ti) {
|
||||
[this](const TextInfo & ti) {
|
||||
this->references = ti.references;
|
||||
this->ca = TextHash { std::move(ti) };
|
||||
},
|
||||
[this](FixedOutputInfo foi) {
|
||||
[this](const FixedOutputInfo & foi) {
|
||||
*(static_cast<PathReferences<StorePath> *>(this)) = foi.references;
|
||||
this->ca = FixedOutputHash { (FixedOutputHash) std::move(foi) };
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue