lix/src/nix/optimise-store.cc
jade 8be7030299 util.hh: split out signals stuff
Copies part of the changes of ac89bb064aeea85a62b82a6daf0ecca7190a28b7

Change-Id: I9ce601875cd6d4db5eb1132d7835c5bab9f126d8
2024-03-11 00:52:09 -07:00

31 lines
582 B
C++

#include "command.hh"
#include "shared.hh"
#include "signals.hh"
#include "store-api.hh"
#include <atomic>
using namespace nix;
struct CmdOptimiseStore : StoreCommand
{
std::string description() override
{
return "replace identical files in the store by hard links";
}
std::string doc() override
{
return
#include "optimise-store.md"
;
}
void run(ref<Store> store) override
{
store->optimiseStore();
}
};
static auto rCmdOptimiseStore = registerCommand2<CmdOptimiseStore>({"store", "optimise"});