wopAddToStore: Throw to clarify unused refs

Co-authored-by: John Ericson <git@JohnEricson.me>
This commit is contained in:
Robert Hensing 2020-09-17 21:32:01 +02:00 committed by Robert Hensing
parent c602ebfb34
commit ecc8088cb7

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);