mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
prune: drop unused parameter
This commit is contained in:
@@ -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))
|
printer.P("%d snapshots have been removed, running prune\n", len(removeSnIDs))
|
||||||
}
|
}
|
||||||
pruneOptions.DryRun = opts.DryRun
|
pruneOptions.DryRun = opts.DryRun
|
||||||
return runPruneWithRepo(ctx, pruneOptions, gopts, repo, removeSnIDs, printer)
|
return runPruneWithRepo(ctx, pruneOptions, repo, removeSnIDs, printer)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -51,10 +51,10 @@ func runKeyRemove(ctx context.Context, gopts GlobalOptions, args []string, term
|
|||||||
}
|
}
|
||||||
defer unlock()
|
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)
|
id, err := restic.Find(ctx, repo, restic.KeyFile, idPrefix)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -183,10 +183,10 @@ func runPrune(ctx context.Context, opts PruneOptions, gopts GlobalOptions, term
|
|||||||
opts.unsafeRecovery = true
|
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 {
|
if repo.Cache() == nil {
|
||||||
printer.S("warning: running prune without a cache, this may be very slow!")
|
printer.S("warning: running prune without a cache, this may be very slow!")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user