aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-03-17 21:35:42 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-03-17 21:35:42 +0100
commitd8f69b9a4c3600d0ddfcbc17659b71c53f14f5f0 (patch)
treebb128b9538ce779b13c47fe2ea39b535c41314e8 /src
parent711705345716109749c59586bee62238cabff76c (diff)
parentd58453f72ea584cac2e3362fd6a73fcf0e3b615e (diff)
Merge branch 'avoid-quadratic-gc' of https://github.com/trofi/nix
Diffstat (limited to 'src')
-rw-r--r--src/libstore/gc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 69755bd19..f65fb1b2e 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -678,7 +678,8 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
alive.insert(start);
try {
StorePathSet closure;
- computeFSClosure(*path, closure);
+ computeFSClosure(*path, closure,
+ /* flipDirection */ false, gcKeepOutputs, gcKeepDerivations);
for (auto & p : closure)
alive.insert(p);
} catch (InvalidPath &) { }