From ff099a216a169b4b53af3511305c0ed704e0a98d Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Wed, 19 Nov 2025 21:40:36 +0100 Subject: [PATCH] copy: use AssociatedBlobSet --- cmd/restic/cmd_copy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/restic/cmd_copy.go b/cmd/restic/cmd_copy.go index bf86de8a7..823dcaf4e 100644 --- a/cmd/restic/cmd_copy.go +++ b/cmd/restic/cmd_copy.go @@ -252,7 +252,7 @@ func copyTree(ctx context.Context, srcRepo restic.Repository, dstRepo restic.Rep return visited }, nil) - copyBlobs := restic.NewBlobSet() + copyBlobs := srcRepo.NewAssociatedBlobSet() packList := restic.NewIDSet() enqueue := func(h restic.BlobHandle) { @@ -299,11 +299,11 @@ func copyTree(ctx context.Context, srcRepo restic.Repository, dstRepo restic.Rep } // copyStats: print statistics for the blobs to be copied -func copyStats(srcRepo restic.Repository, copyBlobs restic.BlobSet, packList restic.IDSet, printer progress.Printer) uint64 { +func copyStats(srcRepo restic.Repository, copyBlobs restic.AssociatedBlobSet, packList restic.IDSet, printer progress.Printer) uint64 { // count and size countBlobs := 0 sizeBlobs := uint64(0) - for blob := range copyBlobs { + for blob := range copyBlobs.Keys() { for _, blob := range srcRepo.LookupBlob(blob.Type, blob.ID) { countBlobs++ sizeBlobs += uint64(blob.Length)