nix-super/src/nix/optimise-store.cc

30 lines
560 B
C++
Raw Normal View History

#include "command.hh"
#include "shared.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";
}
2020-12-10 00:54:11 +02:00
std::string doc() override
{
2020-12-10 00:54:11 +02:00
return
#include "optimise-store.md"
;
}
void run(ref<Store> store) override
{
store->optimiseStore();
}
};
static auto rCmdOptimiseStore = registerCommand2<CmdOptimiseStore>({"store", "optimise"});