mirror of
https://github.com/octoleo/restic.git
synced 2024-12-02 09:58:25 +00:00
Make houndci-bot happy.
This commit is contained in:
parent
929f90344e
commit
103a491ac0
@ -112,12 +112,12 @@ func ApplyPolicy(list Snapshots, p ExpirePolicy) (keep, remove Snapshots) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, cur := range list {
|
for _, cur := range list {
|
||||||
var keep_snap bool
|
var keepSnap bool
|
||||||
|
|
||||||
// Tags are handled specially as they are not counted.
|
// Tags are handled specially as they are not counted.
|
||||||
if len(p.Tags) > 0 {
|
if len(p.Tags) > 0 {
|
||||||
if cur.HasTags(p.Tags) {
|
if cur.HasTags(p.Tags) {
|
||||||
keep_snap = true
|
keepSnap = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Now update the other buckets and see if they have some counts left.
|
// Now update the other buckets and see if they have some counts left.
|
||||||
@ -125,14 +125,14 @@ func ApplyPolicy(list Snapshots, p ExpirePolicy) (keep, remove Snapshots) {
|
|||||||
if b.Count > 0 {
|
if b.Count > 0 {
|
||||||
val := b.bucker(cur.Time)
|
val := b.bucker(cur.Time)
|
||||||
if val != b.Last {
|
if val != b.Last {
|
||||||
keep_snap = true
|
keepSnap = true
|
||||||
buckets[i].Last = val
|
buckets[i].Last = val
|
||||||
buckets[i].Count--
|
buckets[i].Count--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if keep_snap {
|
if keepSnap {
|
||||||
keep = append(keep, cur)
|
keep = append(keep, cur)
|
||||||
} else {
|
} else {
|
||||||
remove = append(remove, cur)
|
remove = append(remove, cur)
|
||||||
|
Loading…
Reference in New Issue
Block a user