From 967d066d8e452e59507ebae7585d6f34a4edf687 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Aug 2012 19:14:30 -0400 Subject: nix-store --gc: Make ‘--max-freed 0’ do the right thing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That is, delete almost nothing (it will still remove unused links from /nix/store/.links). --- src/nix-store/nix-store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix-store') diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 82e08fecf22a..9a675fcd576a 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -583,7 +583,7 @@ static void opGC(Strings opFlags, Strings opArgs) else if (*i == "--delete") options.action = GCOptions::gcDeleteDead; else if (*i == "--max-freed") { long long maxFreed = getIntArg(*i, i, opFlags.end()); - options.maxFreed = maxFreed >= 1 ? maxFreed : 1; + options.maxFreed = maxFreed >= 0 ? maxFreed : 0; } else throw UsageError(format("bad sub-operation `%1%' in GC") % *i); -- cgit 1.4.1