diff options
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r-- | src/nix-store/nix-store.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 8c3744824ce6..51839fac11ee 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -823,16 +823,6 @@ static void opRepairPath(Strings opFlags, Strings opArgs) } } - -static void showOptimiseStats(OptimiseStats & stats) -{ - printMsg(lvlError, - format("%1% freed by hard-linking %2% files") - % showBytes(stats.bytesFreed) - % stats.filesLinked); -} - - /* Optimise the disk space usage of the Nix store by hard-linking files with the same contents. */ static void opOptimise(Strings opFlags, Strings opArgs) @@ -840,17 +830,9 @@ static void opOptimise(Strings opFlags, Strings opArgs) if (!opArgs.empty() || !opFlags.empty()) throw UsageError("no arguments expected"); - OptimiseStats stats; - try { - ensureLocalStore().optimiseStore(stats); - } catch (...) { - showOptimiseStats(stats); - throw; - } - showOptimiseStats(stats); + store->optimiseStore(); } - static void opQueryFailedPaths(Strings opFlags, Strings opArgs) { if (!opArgs.empty() || !opFlags.empty()) |