mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 22:12:43 +01:00
Merge remote-tracking branch 'upstream/master' into ca-derivation-data-types
This commit is contained in:
commit
e6115ca004
31 changed files with 149 additions and 145 deletions
|
|
@ -3,7 +3,7 @@
|
|||
namespace nix {
|
||||
|
||||
std::string FixedOutputHash::printMethodAlgo() const {
|
||||
return makeFileIngestionPrefix(method) + printHashType(*hash.type);
|
||||
return makeFileIngestionPrefix(method) + printHashType(hash.type);
|
||||
}
|
||||
|
||||
std::string makeFileIngestionPrefix(const FileIngestionMethod m) {
|
||||
|
|
@ -42,7 +42,7 @@ ContentAddress parseContentAddress(std::string_view rawCa) {
|
|||
if (prefix == "text") {
|
||||
auto hashTypeAndHash = rawCa.substr(prefixSeparator+1, string::npos);
|
||||
Hash hash = Hash(string(hashTypeAndHash));
|
||||
if (*hash.type != htSHA256) {
|
||||
if (hash.type != htSHA256) {
|
||||
throw Error("parseContentAddress: the text hash should have type SHA256");
|
||||
}
|
||||
return TextHash { hash };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue