mirror of
https://github.com/NixOS/nix
synced 2025-06-29 10:31:15 +02:00
Cleanup ContentAddressMethod
to match docs
The old `std::variant` is bad because we aren't adding a new case to `FileIngestionMethod` so much as we are defining a separate concept --- store object content addressing rather than file system object content addressing. As such, it is more correct to just create a fresh enumeration. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
64e599ebe1
commit
b51e161af5
25 changed files with 275 additions and 203 deletions
|
@ -441,7 +441,7 @@ public:
|
|||
virtual StorePath addToStore(
|
||||
std::string_view name,
|
||||
const SourcePath & path,
|
||||
ContentAddressMethod method = FileIngestionMethod::NixArchive,
|
||||
ContentAddressMethod method = ContentAddressMethod::Raw::NixArchive,
|
||||
HashAlgorithm hashAlgo = HashAlgorithm::SHA256,
|
||||
const StorePathSet & references = StorePathSet(),
|
||||
PathFilter & filter = defaultPathFilter,
|
||||
|
@ -455,7 +455,7 @@ public:
|
|||
ValidPathInfo addToStoreSlow(
|
||||
std::string_view name,
|
||||
const SourcePath & path,
|
||||
ContentAddressMethod method = FileIngestionMethod::NixArchive,
|
||||
ContentAddressMethod method = ContentAddressMethod::Raw::NixArchive,
|
||||
HashAlgorithm hashAlgo = HashAlgorithm::SHA256,
|
||||
const StorePathSet & references = StorePathSet(),
|
||||
std::optional<Hash> expectedCAHash = {});
|
||||
|
@ -481,7 +481,7 @@ public:
|
|||
Source & dump,
|
||||
std::string_view name,
|
||||
FileSerialisationMethod dumpMethod = FileSerialisationMethod::NixArchive,
|
||||
ContentAddressMethod hashMethod = FileIngestionMethod::NixArchive,
|
||||
ContentAddressMethod hashMethod = ContentAddressMethod::Raw::NixArchive,
|
||||
HashAlgorithm hashAlgo = HashAlgorithm::SHA256,
|
||||
const StorePathSet & references = StorePathSet(),
|
||||
RepairFlag repair = NoRepair) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue