prune: drop unused parameter

This commit is contained in:
Michael Eischer 2025-09-17 21:18:15 +02:00
parent 2a9105c050
commit d6c75ba2dc
3 changed files with 5 additions and 5 deletions

View file

@ -347,7 +347,7 @@ func runForget(ctx context.Context, opts ForgetOptions, pruneOptions PruneOption
printer.P("%d snapshots have been removed, running prune\n", len(removeSnIDs))
}
pruneOptions.DryRun = opts.DryRun
return runPruneWithRepo(ctx, pruneOptions, gopts, repo, removeSnIDs, printer)
return runPruneWithRepo(ctx, pruneOptions, repo, removeSnIDs, printer)
}
return nil

View file

@ -51,10 +51,10 @@ func runKeyRemove(ctx context.Context, gopts GlobalOptions, args []string, term
}
defer unlock()
return deleteKey(ctx, repo, args[0], gopts, printer)
return deleteKey(ctx, repo, args[0], printer)
}
func deleteKey(ctx context.Context, repo *repository.Repository, idPrefix string, gopts GlobalOptions, printer progress.Printer) error {
func deleteKey(ctx context.Context, repo *repository.Repository, idPrefix string, printer progress.Printer) error {
id, err := restic.Find(ctx, repo, restic.KeyFile, idPrefix)
if err != nil {
return err

View file

@ -183,10 +183,10 @@ func runPrune(ctx context.Context, opts PruneOptions, gopts GlobalOptions, term
opts.unsafeRecovery = true
}
return runPruneWithRepo(ctx, opts, gopts, repo, restic.NewIDSet(), printer)
return runPruneWithRepo(ctx, opts, repo, restic.NewIDSet(), printer)
}
func runPruneWithRepo(ctx context.Context, opts PruneOptions, gopts GlobalOptions, repo *repository.Repository, ignoreSnapshots restic.IDSet, printer progress.Printer) error {
func runPruneWithRepo(ctx context.Context, opts PruneOptions, repo *repository.Repository, ignoreSnapshots restic.IDSet, printer progress.Printer) error {
if repo.Cache() == nil {
printer.S("warning: running prune without a cache, this may be very slow!")
}