Merge pull request #5162 from MichaelEischer/promote-feature-gates

Stabilize `explicit-s3-anonymous-auth` and `safe-forget-keep-tags` feature flags
This commit is contained in:
Michael Eischer
2025-01-13 22:03:06 +01:00
committed by GitHub
4 changed files with 11 additions and 10 deletions
+1 -2
View File
@@ -8,7 +8,6 @@ import (
"strconv"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/feature"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/ui/termstatus"
"github.com/spf13/cobra"
@@ -271,7 +270,7 @@ func runForget(ctx context.Context, opts ForgetOptions, pruneOptions PruneOption
keep, remove, reasons := restic.ApplyPolicy(snapshotGroup, policy)
if feature.Flag.Enabled(feature.SafeForgetKeepTags) && !policy.Empty() && len(keep) == 0 {
if !policy.Empty() && len(keep) == 0 {
return fmt.Errorf("refusing to delete last snapshot of snapshot group \"%v\"", key.String())
}
if len(keep) != 0 && !gopts.Quiet && !gopts.JSON {