1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Add comment

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
Eelco Dolstra 2025-01-20 14:57:56 +01:00 committed by GitHub
parent cc838e8181
commit 2669e4ac4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -541,6 +541,7 @@ void RemoteStore::addMultipleToStore(
{ {
auto source = sinkToSource([&](Sink & sink) { auto source = sinkToSource([&](Sink & sink) {
sink << pathsToCopy.size(); sink << pathsToCopy.size();
// Reverse, so we can release memory at the original start
std::reverse(pathsToCopy.begin(), pathsToCopy.end()); std::reverse(pathsToCopy.begin(), pathsToCopy.end());
while (!pathsToCopy.empty()) { while (!pathsToCopy.empty()) {
auto & [pathInfo, pathSource] = pathsToCopy.back(); auto & [pathInfo, pathSource] = pathsToCopy.back();