-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(forget)!: Make keep-* Options and add keep-none (#238)
Breaking Change: The keep-options for `forget` are now real `Options`. This also adds an additional check which enforces that at least one `keep-*` option is set and adds a new `keep-none` option which can be use as single valid `keep-` option (if you want to remove all snapshots). closes rustic-rs/rustic#1191
- Loading branch information
Showing
47 changed files
with
7,854 additions
and
136 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
133 changes: 133 additions & 0 deletions
133
crates/core/src/commands/snapshots/rustic_core__commands__forget__tests__keep-daily10.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
source: crates/core/src/commands/forget.rs | ||
expression: result | ||
--- | ||
ForgetResult([ | ||
("2016-01-18T12:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-12T21:08:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-12T21:02:03Z", false, []), | ||
("2016-01-09T21:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-08T20:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-07T10:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-06T08:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-05T09:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-04T16:23:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-04T12:30:03Z", false, []), | ||
("2016-01-04T12:28:03Z", false, []), | ||
("2016-01-04T12:24:03Z", false, []), | ||
("2016-01-04T12:23:03Z", false, []), | ||
("2016-01-04T11:23:03Z", false, []), | ||
("2016-01-04T10:23:03Z", false, []), | ||
("2016-01-03T07:02:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-01T07:08:03Z", true, [ | ||
"daily", | ||
]), | ||
("2016-01-01T01:03:03Z", false, []), | ||
("2016-01-01T01:02:03Z", false, []), | ||
("2015-11-22T10:20:30Z", false, []), | ||
("2015-11-21T10:20:30Z", false, []), | ||
("2015-11-20T10:20:30Z", false, []), | ||
("2015-11-18T10:20:30Z", false, []), | ||
("2015-11-15T10:20:30Z", false, []), | ||
("2015-11-13T10:20:30Z", false, []), | ||
("2015-11-12T10:20:30Z", false, []), | ||
("2015-11-10T10:20:30Z", false, []), | ||
("2015-11-08T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-20T10:20:30Z", false, []), | ||
("2015-10-11T10:20:30Z", false, []), | ||
("2015-10-10T10:20:30Z", false, []), | ||
("2015-10-09T10:20:30Z", false, []), | ||
("2015-10-08T10:20:30Z", false, []), | ||
("2015-10-06T10:20:30Z", false, []), | ||
("2015-10-05T10:20:30Z", false, []), | ||
("2015-10-02T10:20:30Z", false, []), | ||
("2015-10-01T10:20:30Z", false, []), | ||
("2015-09-22T10:20:30Z", false, []), | ||
("2015-09-20T10:20:30Z", false, []), | ||
("2015-09-11T10:20:30Z", false, []), | ||
("2015-09-10T10:20:30Z", false, []), | ||
("2015-09-09T10:20:30Z", false, []), | ||
("2015-09-08T10:20:30Z", false, []), | ||
("2015-09-06T10:20:30Z", false, []), | ||
("2015-09-05T10:20:30Z", false, []), | ||
("2015-09-02T10:20:30Z", false, []), | ||
("2015-09-01T10:20:30Z", false, []), | ||
("2015-08-22T10:20:30Z", false, []), | ||
("2015-08-21T10:20:30Z", false, []), | ||
("2015-08-20T10:20:30Z", false, []), | ||
("2015-08-18T10:20:30Z", false, []), | ||
("2015-08-15T10:20:30Z", false, []), | ||
("2015-08-13T10:20:30Z", false, []), | ||
("2015-08-12T10:20:30Z", false, []), | ||
("2015-08-10T10:20:30Z", false, []), | ||
("2015-08-08T10:20:30Z", false, []), | ||
("2014-11-22T10:20:30Z", false, []), | ||
("2014-11-21T10:20:30Z", false, []), | ||
("2014-11-20T10:20:30Z", false, []), | ||
("2014-11-18T10:20:30Z", false, []), | ||
("2014-11-15T10:20:30Z", false, []), | ||
("2014-11-13T10:20:30Z", false, []), | ||
("2014-11-12T10:20:30Z", false, []), | ||
("2014-11-10T10:20:30Z", false, []), | ||
("2014-11-08T10:20:30Z", false, []), | ||
("2014-10-22T10:20:30Z", false, []), | ||
("2014-10-20T10:20:30Z", false, []), | ||
("2014-10-11T10:20:30Z", false, []), | ||
("2014-10-10T10:20:30Z", false, []), | ||
("2014-10-09T10:20:30Z", false, []), | ||
("2014-10-08T10:20:30Z", false, []), | ||
("2014-10-06T10:20:30Z", false, []), | ||
("2014-10-05T10:20:30Z", false, []), | ||
("2014-10-02T10:20:30Z", false, []), | ||
("2014-10-01T10:20:30Z", false, []), | ||
("2014-09-22T10:20:30Z", false, []), | ||
("2014-09-20T10:20:30Z", false, []), | ||
("2014-09-11T10:20:30Z", false, []), | ||
("2014-09-10T10:20:30Z", false, []), | ||
("2014-09-09T10:20:30Z", false, []), | ||
("2014-09-08T10:20:30Z", false, []), | ||
("2014-09-06T10:20:30Z", false, []), | ||
("2014-09-05T10:20:30Z", false, []), | ||
("2014-09-02T10:20:30Z", false, []), | ||
("2014-09-01T10:29:37Z", true, [ | ||
"snapshot", | ||
]), | ||
("2014-09-01T10:28:37Z", false, [ | ||
"snapshot", | ||
]), | ||
("2014-09-01T10:25:37Z", true, [ | ||
"snapshot", | ||
]), | ||
("2014-09-01T10:20:30Z", false, []), | ||
("2014-08-22T10:20:30Z", false, []), | ||
("2014-08-21T10:20:30Z", false, []), | ||
("2014-08-20T10:20:30Z", false, []), | ||
("2014-08-18T10:20:30Z", false, []), | ||
("2014-08-15T10:20:30Z", false, []), | ||
("2014-08-13T10:20:30Z", false, []), | ||
("2014-08-12T10:20:30Z", false, []), | ||
("2014-08-10T10:20:30Z", false, []), | ||
("2014-08-08T10:20:30Z", false, []), | ||
]) |
130 changes: 130 additions & 0 deletions
130
...apshots/rustic_core__commands__forget__tests__keep-daily2,keep-weekly2,keep-monthly6.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
--- | ||
source: crates/core/src/commands/forget.rs | ||
expression: result | ||
--- | ||
ForgetResult([ | ||
("2016-01-18T12:02:03Z", true, [ | ||
"daily", | ||
"weekly", | ||
"monthly", | ||
]), | ||
("2016-01-12T21:08:03Z", true, [ | ||
"daily", | ||
"weekly", | ||
]), | ||
("2016-01-12T21:02:03Z", false, []), | ||
("2016-01-09T21:02:03Z", false, []), | ||
("2016-01-08T20:02:03Z", false, []), | ||
("2016-01-07T10:02:03Z", false, []), | ||
("2016-01-06T08:02:03Z", false, []), | ||
("2016-01-05T09:02:03Z", false, []), | ||
("2016-01-04T16:23:03Z", false, []), | ||
("2016-01-04T12:30:03Z", false, []), | ||
("2016-01-04T12:28:03Z", false, []), | ||
("2016-01-04T12:24:03Z", false, []), | ||
("2016-01-04T12:23:03Z", false, []), | ||
("2016-01-04T11:23:03Z", false, []), | ||
("2016-01-04T10:23:03Z", false, []), | ||
("2016-01-03T07:02:03Z", false, []), | ||
("2016-01-01T07:08:03Z", false, []), | ||
("2016-01-01T01:03:03Z", false, []), | ||
("2016-01-01T01:02:03Z", false, []), | ||
("2015-11-22T10:20:30Z", true, [ | ||
"monthly", | ||
]), | ||
("2015-11-21T10:20:30Z", false, []), | ||
("2015-11-20T10:20:30Z", false, []), | ||
("2015-11-18T10:20:30Z", false, []), | ||
("2015-11-15T10:20:30Z", false, []), | ||
("2015-11-13T10:20:30Z", false, []), | ||
("2015-11-12T10:20:30Z", false, []), | ||
("2015-11-10T10:20:30Z", false, []), | ||
("2015-11-08T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", true, [ | ||
"monthly", | ||
]), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-22T10:20:30Z", false, []), | ||
("2015-10-20T10:20:30Z", false, []), | ||
("2015-10-11T10:20:30Z", false, []), | ||
("2015-10-10T10:20:30Z", false, []), | ||
("2015-10-09T10:20:30Z", false, []), | ||
("2015-10-08T10:20:30Z", false, []), | ||
("2015-10-06T10:20:30Z", false, []), | ||
("2015-10-05T10:20:30Z", false, []), | ||
("2015-10-02T10:20:30Z", false, []), | ||
("2015-10-01T10:20:30Z", false, []), | ||
("2015-09-22T10:20:30Z", true, [ | ||
"monthly", | ||
]), | ||
("2015-09-20T10:20:30Z", false, []), | ||
("2015-09-11T10:20:30Z", false, []), | ||
("2015-09-10T10:20:30Z", false, []), | ||
("2015-09-09T10:20:30Z", false, []), | ||
("2015-09-08T10:20:30Z", false, []), | ||
("2015-09-06T10:20:30Z", false, []), | ||
("2015-09-05T10:20:30Z", false, []), | ||
("2015-09-02T10:20:30Z", false, []), | ||
("2015-09-01T10:20:30Z", false, []), | ||
("2015-08-22T10:20:30Z", true, [ | ||
"monthly", | ||
]), | ||
("2015-08-21T10:20:30Z", false, []), | ||
("2015-08-20T10:20:30Z", false, []), | ||
("2015-08-18T10:20:30Z", false, []), | ||
("2015-08-15T10:20:30Z", false, []), | ||
("2015-08-13T10:20:30Z", false, []), | ||
("2015-08-12T10:20:30Z", false, []), | ||
("2015-08-10T10:20:30Z", false, []), | ||
("2015-08-08T10:20:30Z", false, []), | ||
("2014-11-22T10:20:30Z", true, [ | ||
"monthly", | ||
]), | ||
("2014-11-21T10:20:30Z", false, []), | ||
("2014-11-20T10:20:30Z", false, []), | ||
("2014-11-18T10:20:30Z", false, []), | ||
("2014-11-15T10:20:30Z", false, []), | ||
("2014-11-13T10:20:30Z", false, []), | ||
("2014-11-12T10:20:30Z", false, []), | ||
("2014-11-10T10:20:30Z", false, []), | ||
("2014-11-08T10:20:30Z", false, []), | ||
("2014-10-22T10:20:30Z", false, []), | ||
("2014-10-20T10:20:30Z", false, []), | ||
("2014-10-11T10:20:30Z", false, []), | ||
("2014-10-10T10:20:30Z", false, []), | ||
("2014-10-09T10:20:30Z", false, []), | ||
("2014-10-08T10:20:30Z", false, []), | ||
("2014-10-06T10:20:30Z", false, []), | ||
("2014-10-05T10:20:30Z", false, []), | ||
("2014-10-02T10:20:30Z", false, []), | ||
("2014-10-01T10:20:30Z", false, []), | ||
("2014-09-22T10:20:30Z", false, []), | ||
("2014-09-20T10:20:30Z", false, []), | ||
("2014-09-11T10:20:30Z", false, []), | ||
("2014-09-10T10:20:30Z", false, []), | ||
("2014-09-09T10:20:30Z", false, []), | ||
("2014-09-08T10:20:30Z", false, []), | ||
("2014-09-06T10:20:30Z", false, []), | ||
("2014-09-05T10:20:30Z", false, []), | ||
("2014-09-02T10:20:30Z", false, []), | ||
("2014-09-01T10:29:37Z", true, [ | ||
"snapshot", | ||
]), | ||
("2014-09-01T10:28:37Z", false, [ | ||
"snapshot", | ||
]), | ||
("2014-09-01T10:25:37Z", true, [ | ||
"snapshot", | ||
]), | ||
("2014-09-01T10:20:30Z", false, []), | ||
("2014-08-22T10:20:30Z", false, []), | ||
("2014-08-21T10:20:30Z", false, []), | ||
("2014-08-20T10:20:30Z", false, []), | ||
("2014-08-18T10:20:30Z", false, []), | ||
("2014-08-15T10:20:30Z", false, []), | ||
("2014-08-13T10:20:30Z", false, []), | ||
("2014-08-12T10:20:30Z", false, []), | ||
("2014-08-10T10:20:30Z", false, []), | ||
("2014-08-08T10:20:30Z", false, []), | ||
]) |
Oops, something went wrong.