From adc0284113112935a95f088e6777a59921fdbae1 Mon Sep 17 00:00:00 2001 From: MikeeI Date: Sun, 18 Oct 2026 15:50:05 +0200 Subject: [PATCH] copy: avoid a full index scan for disabled debug output (#22103) --- internal/repository/repack.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/repository/repack.go b/internal/repository/repack.go index 910b871df..f42fb13de 100644 --- a/internal/repository/repack.go +++ b/internal/repository/repack.go @@ -17,7 +17,6 @@ import ( type repackBlobSet interface { Has(bh restic.BlobHandle) bool Delete(bh restic.BlobHandle) - Len() int } type LogFunc func(msg string, args ...any) @@ -39,7 +38,7 @@ func CopyBlobs( p restic.Counter, logf LogFunc, ) error { - debug.Log("repacking %d packs while keeping %d blobs", len(packs), keepBlobs.Len()) + debug.Log("repacking %d packs", len(packs)) if logf == nil { logf = func(_ string, _ ...any) {}