repair pack: reenable auto index updates

The method is not available on the restic.Repository interface that is
used for testing. Drop the call as a small amount of additional index
writes is not a problem.
This commit is contained in:
Michael Eischer 2024-01-20 21:52:27 +01:00
parent feeab84204
commit 7c351bc53c

View file

@ -10,10 +10,9 @@ import (
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )
func RepairPacks(ctx context.Context, repo *Repository, ids restic.IDSet, printer progress.Printer) error { func RepairPacks(ctx context.Context, repo restic.Repository, ids restic.IDSet, printer progress.Printer) error {
wg, wgCtx := errgroup.WithContext(ctx) wg, wgCtx := errgroup.WithContext(ctx)
repo.StartPackUploader(wgCtx, wg) repo.StartPackUploader(wgCtx, wg)
repo.DisableAutoIndexUpdate()
printer.P("salvaging intact data from specified pack files") printer.P("salvaging intact data from specified pack files")
bar := printer.NewCounter("pack files") bar := printer.NewCounter("pack files")