check: Simplify blob status tracking

UnusedBlobs now directly reads the list of existing blobs from the
repository index. This removes the need for the blobStatusExists flag,
which in turn allows converting the blobRefs map into a BlobSet.
This commit is contained in:
Michael Eischer committed 2020-11-15 18:42:42 +01:00
1 parent b8c7543a55
commit 3500f9490c
4 files changed
+18 -24

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ func TestCheckRepo(t testing.TB, repo restic.Repository) {
}
// unused blobs
blobs := chkr.UnusedBlobs()
blobs := chkr.UnusedBlobs(context.TODO())
if len(blobs) > 0 {
t.Errorf("unused blobs found: %v", blobs)
}