diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-06 15:37:31 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-06 15:45:34 -0500 |
commit | 81727f85cb567c4d5282c330d63a74ed84d12783 (patch) | |
tree | 5808cba3e02ff55657355562007ddd3a20892dfb /src/libstore/content-address.cc | |
parent | 7e1cfa97c6b410ed25ae0d3c3f10274aae9f6758 (diff) | |
parent | 46e942ff9e65755689ee72f93846d7118e1b8d45 (diff) |
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'src/libstore/content-address.cc')
-rw-r--r-- | src/libstore/content-address.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc index 5caf743e5..05b289ee7 100644 --- a/src/libstore/content-address.cc +++ b/src/libstore/content-address.cc @@ -161,15 +161,15 @@ std::string renderContentAddress(std::optional<ContentAddress> ca) } ContentAddressWithReferences contentAddressFromMethodHashAndRefs( - ContentAddressMethod method, Hash && hash, PathReferences<StorePath> && refs) + ContentAddressMethod method, Hash && hash, StoreReferences && refs) { return std::visit(overloaded { [&](TextHashMethod _) -> ContentAddressWithReferences { - if (refs.hasSelfReference) + if (refs.self) throw UsageError("Cannot have a self reference with text hashing scheme"); return TextInfo { { .hash = std::move(hash) }, - std::move(refs.references), + .references = std::move(refs.others), }; }, [&](FileIngestionMethod m2) -> ContentAddressWithReferences { @@ -178,7 +178,7 @@ ContentAddressWithReferences contentAddressFromMethodHashAndRefs( .method = m2, .hash = std::move(hash), }, - std::move(refs), + .references = std::move(refs), }; }, }, method); |