libstore: remove unused parameter of Store::addToStore

Change-Id: I2816ed2689da8adb5634da180389e049e6ace6bc
This commit is contained in:
eldritch horrors
2025-03-02 17:37:12 +00:00
parent 8ce7d59c45
commit 349516d6c7
6 changed files with 8 additions and 14 deletions
+2 -3
View File
@@ -382,8 +382,7 @@ kj::Promise<Result<StorePath>> BinaryCacheStore::addToStore(
FileIngestionMethod method,
HashType hashAlgo,
PathFilter & filter,
RepairFlag repair,
const StorePathSet & references)
RepairFlag repair)
try {
/* FIXME: Make BinaryCacheStore::addToStoreCommon support
non-recursive+sha256 so we can just use the default
@@ -406,7 +405,7 @@ try {
.method = method,
.hash = h,
.references = {
.others = references,
.others = {},
// caller is not capable of creating a self-reference, because this is content-addressed without modulus
.self = false,
},
+1 -2
View File
@@ -125,8 +125,7 @@ public:
FileIngestionMethod method,
HashType hashAlgo,
PathFilter & filter,
RepairFlag repair,
const StorePathSet & references) override;
RepairFlag repair) override;
kj::Promise<Result<StorePath>> addTextToStore(
std::string_view name,
+1 -2
View File
@@ -1087,8 +1087,7 @@ struct RestrictedStore : public virtual IndirectRootStore, public virtual GcStor
FileIngestionMethod method,
HashType hashAlgo,
PathFilter & filter,
RepairFlag repair,
const StorePathSet & references) override
RepairFlag repair) override
try { throw Error("addToStore"); } catch (...) { return {result::current_exception()}; }
kj::Promise<Result<void>> addToStore(const ValidPathInfo & info, Source & narSource,
+1 -2
View File
@@ -268,8 +268,7 @@ struct LegacySSHStore final : public Store
FileIngestionMethod method,
HashType hashAlgo,
PathFilter & filter,
RepairFlag repair,
const StorePathSet & references) override
RepairFlag repair) override
try { unsupported("addToStore"); } catch (...) { return {result::current_exception()}; }
kj::Promise<Result<StorePath>> addTextToStore(
+2 -3
View File
@@ -279,15 +279,14 @@ kj::Promise<Result<StorePath>> Store::addToStore(
FileIngestionMethod method,
HashType hashAlgo,
PathFilter & filter,
RepairFlag repair,
const StorePathSet & references)
RepairFlag repair)
try {
Path srcPath(absPath(_srcPath));
auto source = GeneratorSource{
method == FileIngestionMethod::Recursive ? dumpPath(srcPath, filter).decay()
: readFileSource(srcPath)
};
co_return TRY_AWAIT(addToStoreFromDump(source, name, method, hashAlgo, repair, references));
co_return TRY_AWAIT(addToStoreFromDump(source, name, method, hashAlgo, repair, {}));
} catch (...) {
co_return result::current_exception();
}
+1 -2
View File
@@ -531,8 +531,7 @@ public:
FileIngestionMethod method = FileIngestionMethod::Recursive,
HashType hashAlgo = HashType::SHA256,
PathFilter & filter = defaultPathFilter,
RepairFlag repair = NoRepair,
const StorePathSet & references = StorePathSet());
RepairFlag repair = NoRepair);
/**
* Copy the contents of a path to the store and register the