mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Create new file-hash files
This commit is contained in:
parent
0cb67ecbd3
commit
0e9438b6d3
8 changed files with 64 additions and 52 deletions
|
@ -814,25 +814,6 @@ Strings ValidPathInfo::shortRefs() const
|
|||
}
|
||||
|
||||
|
||||
std::string makeFileIngestionPrefix(const FileIngestionMethod m) {
|
||||
switch (m) {
|
||||
case FileIngestionMethod::Flat:
|
||||
return "";
|
||||
case FileIngestionMethod::Recursive:
|
||||
return "r:";
|
||||
default:
|
||||
throw Error("impossible, caught both cases");
|
||||
}
|
||||
}
|
||||
|
||||
std::string makeFixedOutputCA(FileIngestionMethod method, const Hash & hash)
|
||||
{
|
||||
return "fixed:"
|
||||
+ makeFileIngestionPrefix(method)
|
||||
+ hash.to_string();
|
||||
}
|
||||
|
||||
|
||||
void Store::addToStore(const ValidPathInfo & info, Source & narSource,
|
||||
RepairFlag repair, CheckSigsFlag checkSigs,
|
||||
std::shared_ptr<FSAccessor> accessor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue