1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Merge branch 'path-info' into ca-drv-exotic

This commit is contained in:
John Ericson 2021-10-01 17:25:22 +00:00
commit edf67e1508
24 changed files with 638 additions and 106 deletions

View file

@ -396,7 +396,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
FramedSource source(from);
// TODO this is essentially RemoteStore::addCAToStore. Move it up to Store.
return std::visit(overloaded {
[&](TextHashMethod _) {
[&](TextHashMethod &) {
if (hashType != htSHA256)
throw UnimplementedError("Only SHA-256 is supported for adding text-hashed data, but '%1' was given",
printHashType(hashType));
@ -405,7 +405,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
auto path = store->addTextToStore(name, contents, refs, repair);
return store->queryPathInfo(path);
},
[&](FileIngestionMethod fim) {
[&](FileIngestionMethod & fim) {
if (!refs.empty())
throw UnimplementedError("cannot yet have refs with flat or nar-hashed data");
auto path = store->addToStoreFromDump(source, name, fim, hashType, repair);