mirror of
https://github.com/restic/restic.git
synced 2025-10-09 23:14:08 +00:00
repository: remove IsMixedPack and add replacement for checker
Repositories with mixed packs are probably quite rare by now. When loading data blobs from a mixed pack file, this will no longer trigger caching that file. However, usually tree blobs are accessed first such that this shouldn't make much of a difference. The checker gets a simpler replacement.
This commit is contained in:
@@ -277,12 +277,7 @@ func (r *Repository) LoadBlob(ctx context.Context, t restic.BlobType, id restic.
|
||||
}
|
||||
|
||||
// load blob from pack
|
||||
bt := t
|
||||
if r.idx.IsMixedPack(blob.PackID) {
|
||||
bt = restic.InvalidBlob
|
||||
}
|
||||
h := restic.Handle{Type: restic.PackFile,
|
||||
Name: blob.PackID.String(), ContainedBlobType: bt}
|
||||
h := restic.Handle{Type: restic.PackFile, Name: blob.PackID.String(), ContainedBlobType: t}
|
||||
|
||||
switch {
|
||||
case cap(buf) < int(blob.Length):
|
||||
|
Reference in New Issue
Block a user