1
0
Fork 0
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:
John Ericson 2024-05-16 17:46:43 -04:00
parent 903acc7c0f
commit 64e599ebe1
37 changed files with 93 additions and 93 deletions

View file

@ -259,7 +259,7 @@ hashPath(char * algo, int base32, char * path)
try {
Hash h = hashPath(
PosixSourceAccessor::createAtRoot(path),
FileIngestionMethod::Recursive, parseHashAlgo(algo)).first;
FileIngestionMethod::NixArchive, parseHashAlgo(algo)).first;
auto s = h.to_string(base32 ? HashFormat::Nix32 : HashFormat::Base16, false);
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
} catch (Error & e) {
@ -335,7 +335,7 @@ SV *
StoreWrapper::addToStore(char * srcPath, int recursive, char * algo)
PPCODE:
try {
auto method = recursive ? FileIngestionMethod::Recursive : FileIngestionMethod::Flat;
auto method = recursive ? FileIngestionMethod::NixArchive : FileIngestionMethod::Flat;
auto path = THIS->store->addToStore(
std::string(baseNameOf(srcPath)),
PosixSourceAccessor::createAtRoot(srcPath),
@ -351,7 +351,7 @@ StoreWrapper::makeFixedOutputPath(int recursive, char * algo, char * hash, char
PPCODE:
try {
auto h = Hash::parseAny(hash, parseHashAlgo(algo));
auto method = recursive ? FileIngestionMethod::Recursive : FileIngestionMethod::Flat;
auto method = recursive ? FileIngestionMethod::NixArchive : FileIngestionMethod::Flat;
auto path = THIS->store->makeFixedOutputPath(name, FixedOutputInfo {
.method = method,
.hash = h,