copy: avoid a full index scan for disabled debug output (#22103)

This commit is contained in:
MikeeI
2026-10-18 13:50:05 +00:00
committed by GitHub
parent 25aa69dbc7
commit adc0284113
+1 -2
View File
@@ -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) {}