mirror of
https://github.com/restic/restic.git
synced 2026-11-19 23:01:08 +00:00
repository: fix parameter order of LookupBlobSize
All methods should use blobType followed by ID.
This commit is contained in:
1 parent
e848ad651a
commit
1266a4932f
17 files changed
+21
-21
No files matched your search
@@ -266,7 +266,7 @@ func testRepack(t *testing.T, version uint) {
|
||||
}
|
||||
|
||||
for h := range removeBlobs {
|
||||
if _, found := repo.LookupBlobSize(h.ID, h.Type); found {
|
||||
if _, found := repo.LookupBlobSize(h.Type, h.ID); found {
|
||||
t.Errorf("blob %v still contained in the repo", h)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,8 +583,8 @@ func (r *Repository) LookupBlob(bh restic.BlobHandle) []restic.PackedBlob {
|
||||
}
|
||||
|
||||
// LookupBlobSize returns the size of blob id.
|
||||
func (r *Repository) LookupBlobSize(id restic.ID, tpe restic.BlobType) (uint, bool) {
|
||||
return r.idx.LookupSize(restic.BlobHandle{ID: id, Type: tpe})
|
||||
func (r *Repository) LookupBlobSize(tpe restic.BlobType, id restic.ID) (uint, bool) {
|
||||
return r.idx.LookupSize(restic.BlobHandle{Type: tpe, ID: id})
|
||||
}
|
||||
|
||||
func (r *Repository) SaveIndex(ctx context.Context, excludePacks restic.IDSet, extraObsolete restic.IDs, opts restic.MasterIndexSaveOpts) error {
|
||||
|
||||
Reference in new issue
Block a user