forked from lix-project/lix
jade
8be7030299
Copies part of the changes of ac89bb064aeea85a62b82a6daf0ecca7190a28b7
Change-Id: I9ce601875cd6d4db5eb1132d7835c5bab9f126d8
31 lines
582 B
C++
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"});
|