Store::computeFSClosure(): Support a set of paths

This way, callers can exploits the parallelism of computeFSClosure()
when they have multiple paths that they need the (combined) closure of.
This commit is contained in:
Eelco Dolstra 2016-11-10 17:45:04 +01:00
parent 2af5d35fdc
commit dd77f7d593
5 changed files with 25 additions and 16 deletions

View file

@ -106,8 +106,8 @@ void StorePathsCommand::run(ref<Store> store)
if (recursive) {
PathSet closure;
for (auto & storePath : storePaths)
store->computeFSClosure(storePath, closure, false, false);
store->computeFSClosure(PathSet(storePaths.begin(), storePaths.end()),
closure, false, false);
storePaths = Paths(closure.begin(), closure.end());
}
}