mirror of
https://github.com/restic/restic.git
synced 2024-12-24 16:54:00 +00:00
Split packe rewrite logic into two case branches
The comma is too sublte, let's split this into two separate branches.
This commit is contained in:
parent
a5b80452fe
commit
f8c4dd7b1a
1 changed files with 4 additions and 2 deletions
|
@ -315,9 +315,11 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB
|
|||
stats.blobs.remove += p.unusedBlobs
|
||||
stats.size.remove += p.unusedSize
|
||||
|
||||
case opts.RepackCachableOnly && p.tpe == restic.DataBlob,
|
||||
case opts.RepackCachableOnly && p.tpe == restic.DataBlob:
|
||||
// if this is a data pack and --repack-cacheable-only is set => keep pack!
|
||||
p.unusedBlobs == 0 && p.duplicateBlobs == 0 && p.tpe != restic.InvalidBlob:
|
||||
stats.packs.keep++
|
||||
|
||||
case p.unusedBlobs == 0 && p.duplicateBlobs == 0 && p.tpe != restic.InvalidBlob:
|
||||
// All blobs in pack are used and not duplicates/mixed => keep pack!
|
||||
stats.packs.keep++
|
||||
|
||||
|
|
Loading…
Reference in a new issue