mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Add Hash::dummy to signal default value
We did this in the same spirit of the dummy value that's present in libstore/path.hh
This commit is contained in:
parent
1d71028f4d
commit
1ad6394b33
4 changed files with 7 additions and 3 deletions
|
|
@ -113,7 +113,7 @@ struct LegacySSHStore : public Store
|
|||
|
||||
if (GET_PROTOCOL_MINOR(conn->remoteVersion) >= 4) {
|
||||
auto s = readString(conn->from);
|
||||
info->narHash = s.empty() ? Hash(htSHA256) : Hash::parseAnyPrefixed(s);
|
||||
info->narHash = s.empty() ? Hash::dummy : Hash::parseAnyPrefixed(s);
|
||||
info->ca = parseContentAddressOpt(readString(conn->from));
|
||||
info->sigs = readStrings<StringSet>(conn->from);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ struct ValidPathInfo
|
|||
|
||||
ValidPathInfo(const ValidPathInfo & other) = default;
|
||||
|
||||
ValidPathInfo(StorePath && path) : path(std::move(path)), narHash(Hash(htSHA256)) { };
|
||||
ValidPathInfo(const StorePath & path) : path(path), narHash(Hash(htSHA256)) { };
|
||||
ValidPathInfo(StorePath && path) : path(std::move(path)), narHash(Hash::dummy) { };
|
||||
ValidPathInfo(const StorePath & path) : path(path), narHash(Hash::dummy) { };
|
||||
|
||||
virtual ~ValidPathInfo() { }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue