wopAddToStore: Throw to clarify unused refs

Co-authored-by: John Ericson <git@JohnEricson.me>
This commit is contained in:
Robert Hensing
2020-09-21 07:55:47 +02:00
committed by Robert Hensing
co-authored by John Ericson
parent c602ebfb34
commit ecc8088cb7
+2
View File
@@ -366,6 +366,8 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
return store->addTextToStore(name, contents, refs);
},
[&](FixedOutputHashMethod &fohm) -> StorePath {
if (!refs.empty())
throw UnimplementedError("cannot yet have refs with flat or nar-hashed data");
return store->addToStoreFromDump(source, name, fohm.fileIngestionMethod, fohm.hashType);
},
}, contentAddressMethod);