Merge branch 'avoid-quadratic-gc' of https://github.com/trofi/nix
This commit is contained in:
commit
d8f69b9a4c
|
@ -678,7 +678,8 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
|
||||||
alive.insert(start);
|
alive.insert(start);
|
||||||
try {
|
try {
|
||||||
StorePathSet closure;
|
StorePathSet closure;
|
||||||
computeFSClosure(*path, closure);
|
computeFSClosure(*path, closure,
|
||||||
|
/* flipDirection */ false, gcKeepOutputs, gcKeepDerivations);
|
||||||
for (auto & p : closure)
|
for (auto & p : closure)
|
||||||
alive.insert(p);
|
alive.insert(p);
|
||||||
} catch (InvalidPath &) { }
|
} catch (InvalidPath &) { }
|
||||||
|
|
Loading…
Reference in a new issue