Skip to content

Commit

Permalink
forget: Display more detailed keep reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Feb 16, 2024
1 parent 37bcc7b commit 2a06815
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/core/src/commands/forget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,12 @@ impl KeepOptions {

while let Some(sn) = iter.next() {
let (keep, reasons) = {
if sn.must_keep(now) {
(true, vec!["snapshot"])
if sn.is_locked(now) {
(true, vec!["locked"])
} else if sn.must_keep(now) {
(true, vec!["delete mark"])
} else if sn.must_delete(now) {
(false, vec!["snapshot"])
(false, vec!["delete mark"])
} else {
let reasons =
group_keep.matches(&sn, last.as_ref(), iter.peek().is_some(), latest_time);
Expand Down

0 comments on commit 2a06815

Please sign in to comment.