mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Rename Recursive
-> NixArchive
For enums: - `FileIngestionMethod` - `FileSerialisationMethod`
This commit is contained in:
parent
903acc7c0f
commit
64e599ebe1
37 changed files with 93 additions and 93 deletions
|
@ -10,7 +10,7 @@ static std::optional<FileSerialisationMethod> parseFileSerialisationMethodOpt(st
|
|||
if (input == "flat") {
|
||||
return FileSerialisationMethod::Flat;
|
||||
} else if (input == "nar") {
|
||||
return FileSerialisationMethod::Recursive;
|
||||
return FileSerialisationMethod::NixArchive;
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ std::string_view renderFileSerialisationMethod(FileSerialisationMethod method)
|
|||
switch (method) {
|
||||
case FileSerialisationMethod::Flat:
|
||||
return "flat";
|
||||
case FileSerialisationMethod::Recursive:
|
||||
case FileSerialisationMethod::NixArchive:
|
||||
return "nar";
|
||||
default:
|
||||
assert(false);
|
||||
|
@ -57,7 +57,7 @@ std::string_view renderFileIngestionMethod(FileIngestionMethod method)
|
|||
{
|
||||
switch (method) {
|
||||
case FileIngestionMethod::Flat:
|
||||
case FileIngestionMethod::Recursive:
|
||||
case FileIngestionMethod::NixArchive:
|
||||
return renderFileSerialisationMethod(
|
||||
static_cast<FileSerialisationMethod>(method));
|
||||
case FileIngestionMethod::Git:
|
||||
|
@ -78,7 +78,7 @@ void dumpPath(
|
|||
case FileSerialisationMethod::Flat:
|
||||
path.readFile(sink);
|
||||
break;
|
||||
case FileSerialisationMethod::Recursive:
|
||||
case FileSerialisationMethod::NixArchive:
|
||||
path.dumpPath(sink, filter);
|
||||
break;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void restorePath(
|
|||
case FileSerialisationMethod::Flat:
|
||||
writeFile(path, source);
|
||||
break;
|
||||
case FileSerialisationMethod::Recursive:
|
||||
case FileSerialisationMethod::NixArchive:
|
||||
restorePath(path, source);
|
||||
break;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ std::pair<Hash, std::optional<uint64_t>> hashPath(
|
|||
{
|
||||
switch (method) {
|
||||
case FileIngestionMethod::Flat:
|
||||
case FileIngestionMethod::Recursive: {
|
||||
case FileIngestionMethod::NixArchive: {
|
||||
auto res = hashPath(path, (FileSerialisationMethod) method, ht, filter);
|
||||
return {res.first, {res.second}};
|
||||
}
|
||||
|
|
|
@ -35,14 +35,14 @@ enum struct FileSerialisationMethod : uint8_t {
|
|||
* See `file-system-object/content-address.md#serial-nix-archive` in
|
||||
* the manual.
|
||||
*/
|
||||
Recursive,
|
||||
NixArchive,
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse a `FileSerialisationMethod` by name. Choice of:
|
||||
*
|
||||
* - `flat`: `FileSerialisationMethod::Flat`
|
||||
* - `nar`: `FileSerialisationMethod::Recursive`
|
||||
* - `nar`: `FileSerialisationMethod::NixArchive`
|
||||
*
|
||||
* Opposite of `renderFileSerialisationMethod`.
|
||||
*/
|
||||
|
@ -107,12 +107,12 @@ enum struct FileIngestionMethod : uint8_t {
|
|||
Flat,
|
||||
|
||||
/**
|
||||
* Hash `FileSerialisationMethod::Recursive` serialisation.
|
||||
* Hash `FileSerialisationMethod::NixArchive` serialisation.
|
||||
*
|
||||
* See `file-system-object/content-address.md#serial-flat` in the
|
||||
* manual.
|
||||
*/
|
||||
Recursive,
|
||||
NixArchive,
|
||||
|
||||
/**
|
||||
* Git hashing.
|
||||
|
@ -127,7 +127,7 @@ enum struct FileIngestionMethod : uint8_t {
|
|||
* Parse a `FileIngestionMethod` by name. Choice of:
|
||||
*
|
||||
* - `flat`: `FileIngestionMethod::Flat`
|
||||
* - `nar`: `FileIngestionMethod::Recursive`
|
||||
* - `nar`: `FileIngestionMethod::NixArchive`
|
||||
* - `git`: `FileIngestionMethod::Git`
|
||||
*
|
||||
* Opposite of `renderFileIngestionMethod`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue