Fix typo in the method name

This commit is contained in:
John Ericson 2023-02-28 11:34:18 -05:00
parent 87ca46263d
commit c36b584f8e
3 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ void ValidPathInfo::sign(const Store & store, const SecretKey & secretKey)
sigs.insert(secretKey.signDetached(fingerprint(store))); sigs.insert(secretKey.signDetached(fingerprint(store)));
} }
std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithReferenences() const std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithReferences() const
{ {
if (! ca) if (! ca)
return std::nullopt; return std::nullopt;
@ -54,7 +54,7 @@ std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithRef
bool ValidPathInfo::isContentAddressed(const Store & store) const bool ValidPathInfo::isContentAddressed(const Store & store) const
{ {
auto fullCaOpt = contentAddressWithReferenences(); auto fullCaOpt = contentAddressWithReferences();
if (! fullCaOpt) if (! fullCaOpt)
return false; return false;

View file

@ -78,7 +78,7 @@ struct ValidPathInfo
void sign(const Store & store, const SecretKey & secretKey); void sign(const Store & store, const SecretKey & secretKey);
std::optional<ContentAddressWithReferences> contentAddressWithReferenences() const; std::optional<ContentAddressWithReferences> contentAddressWithReferences() const;
/* Return true iff the path is verifiably content-addressed. */ /* Return true iff the path is verifiably content-addressed. */
bool isContentAddressed(const Store & store) const; bool isContentAddressed(const Store & store) const;

View file

@ -996,7 +996,7 @@ void copyStorePath(
auto info2 = make_ref<ValidPathInfo>(*info); auto info2 = make_ref<ValidPathInfo>(*info);
info2->path = dstStore.makeFixedOutputPathFromCA( info2->path = dstStore.makeFixedOutputPathFromCA(
info->path.name(), info->path.name(),
info->contentAddressWithReferenences().value()); info->contentAddressWithReferences().value());
if (dstStore.storeDir == srcStore.storeDir) if (dstStore.storeDir == srcStore.storeDir)
assert(info->path == info2->path); assert(info->path == info2->path);
info = info2; info = info2;
@ -1110,7 +1110,7 @@ std::map<StorePath, StorePath> copyPaths(
if (currentPathInfo.ca && currentPathInfo.references.empty()) { if (currentPathInfo.ca && currentPathInfo.references.empty()) {
storePathForDst = dstStore.makeFixedOutputPathFromCA( storePathForDst = dstStore.makeFixedOutputPathFromCA(
currentPathInfo.path.name(), currentPathInfo.path.name(),
currentPathInfo.contentAddressWithReferenences().value()); currentPathInfo.contentAddressWithReferences().value());
if (dstStore.storeDir == srcStore.storeDir) if (dstStore.storeDir == srcStore.storeDir)
assert(storePathForDst == storePathForSrc); assert(storePathForDst == storePathForSrc);
if (storePathForDst != storePathForSrc) if (storePathForDst != storePathForSrc)