mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
Apply suggestions from code review
Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
This commit is contained in:
parent
a5d820a0a3
commit
25e61812f3
5 changed files with 7 additions and 15 deletions
|
|
@ -999,7 +999,9 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source,
|
|||
|
||||
deletePath(realPath);
|
||||
|
||||
if (info.ca && !info.references.empty() && !std::holds_alternative<TextHash>(*info.ca))
|
||||
// text hashing has long been allowed to have non-self-references because it is used for drv files.
|
||||
bool refersToSelf = info.references.count(info.path) > 0;
|
||||
if (info.ca && !info.references.empty() && !(std::holds_alternative<TextHash>(*info.ca) && !refersToSelf))
|
||||
settings.requireExperimentalFeature("ca-references");
|
||||
|
||||
/* While restoring the path from the NAR, compute the hash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue