mirror of
https://github.com/NixOS/nix
synced 2025-06-30 11:43:15 +02:00
Proper parse
and render
functions for FileIngestionMethod
and ContentAddressMethod
No outward facing behavior is changed. Older methods with same names that operate on on method + algo pair (for old-style `<method>:algo`) are renamed to `*WithAlgo`.) The functions are unit-tested in the same way the names for the hash algorithms are tested.
This commit is contained in:
parent
fb5a438dca
commit
41dd9857c7
10 changed files with 162 additions and 30 deletions
|
@ -400,7 +400,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
|||
logger->startWork();
|
||||
auto pathInfo = [&]() {
|
||||
// NB: FramedSource must be out of scope before logger->stopWork();
|
||||
auto [contentAddressMethod, hashAlgo_] = ContentAddressMethod::parse(camStr);
|
||||
auto [contentAddressMethod, hashAlgo_] = ContentAddressMethod::parseWithAlgo(camStr);
|
||||
auto hashAlgo = hashAlgo_; // work around clang bug
|
||||
FramedSource source(from);
|
||||
// TODO these two steps are essentially RemoteStore::addCAToStore. Move it up to Store.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue