mirror of
https://github.com/restic/restic.git
synced 2026-10-19 16:15:41 +00:00
copy: avoid a full index scan for disabled debug output (#22103)
This commit is contained in:
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user