2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 22:27:35 +00:00

forget: Clarify log message for --dry-run --prune

This commit is contained in:
Michael Eischer 2022-12-30 16:15:03 +01:00
parent b404ad4eaa
commit 7a36306901

View File

@ -237,8 +237,12 @@ func runForget(ctx context.Context, opts ForgetOptions, gopts GlobalOptions, arg
if len(removeSnIDs) > 0 && opts.Prune {
if !gopts.JSON {
if opts.DryRun {
Verbosef("%d snapshots would be removed, running prune dry run\n", len(removeSnIDs))
} else {
Verbosef("%d snapshots have been removed, running prune\n", len(removeSnIDs))
}
}
pruneOptions.DryRun = opts.DryRun
return runPruneWithRepo(ctx, pruneOptions, gopts, repo, removeSnIDs)
}