From deac00c6d0a019874016021a74e3d42306afd2e6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 3 Jun 2024 15:49:15 +0200 Subject: [PATCH] Rename large-path-warning-threshold -> warn-large-path-threshold --- src/libstore/globals.hh | 4 ++-- src/libstore/store-api.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 1f3548497..843e77bcf 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -1263,10 +1263,10 @@ public: )" }; - Setting largePathWarningThreshold{ + Setting warnLargePathThreshold{ this, std::numeric_limits::max(), - "large-path-warning-threshold", + "warn-large-path-threshold", R"( Warn when copying a path larger than this number of bytes to the Nix store (as determined by its NAR serialisation). diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 9b519dd84..c67ccd7d4 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -168,7 +168,7 @@ std::pair StoreDirConfig::computeStorePath( PathFilter & filter) const { auto [h, size] = hashPath(path, method.getFileIngestionMethod(), hashAlgo, filter); - if (size && *size >= settings.largePathWarningThreshold) + if (size && *size >= settings.warnLargePathThreshold) warn("hashed large path '%s' (%s)", path, renderSize(*size)); return { makeFixedOutputPathFromCA( @@ -212,7 +212,7 @@ StorePath Store::addToStore( }); LengthSource lengthSource(*source); auto storePath = addToStoreFromDump(lengthSource, name, fsm, method, hashAlgo, references, repair); - if (lengthSource.total >= settings.largePathWarningThreshold) + if (lengthSource.total >= settings.warnLargePathThreshold) warn("copied large path '%s' to the store (%s)", path, renderSize(lengthSource.total)); return storePath; }