mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
feat: readd previous old generation skip
This commit is contained in:
parent
e8a9a1b305
commit
375efcefbd
1 changed files with 6 additions and 0 deletions
|
|
@ -200,6 +200,12 @@ void deleteGenerationsFilter(
|
|||
if (olderThan.has_value()) {
|
||||
older = current;
|
||||
iterDropUntil(gens, older, [&](auto & g) { return g.creationTime < *olderThan; });
|
||||
/* Take the previous generation
|
||||
|
||||
We don't want delete this one yet because it
|
||||
existed at the requested point in time, and
|
||||
we want to be able to roll back to it. */
|
||||
iterDrop(gens, older);
|
||||
}
|
||||
|
||||
// Find first generation to delete by clamping between keepMin and keepMax
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue