Files
kopia/cli/command_snapshot_gc.go
Julio Lopez e9ca80dd27 refactor(cli): deprecate snapshot gc command (#1973)
* refactor(cli): deprecate `snapshot gc` command
* replace `snapshot gc` in tests with `maintenance run`
2022-05-26 05:51:36 +00:00

17 lines
551 B
Go

package cli
import (
"github.com/kopia/kopia/repo/maintenance"
)
type commandSnapshotGC struct {
snapshotGCDelete bool
snapshotGCSafety maintenance.SafetyParameters
}
func (c *commandSnapshotGC) setup(_ appServices, parent commandParent) {
cmd := parent.Command("gc", "DEPRECATED: This command does not do anything and will be removed. Snapshot GC is now automatically done as part of repository maintenance.").Hidden()
cmd.Flag("delete", "Delete unreferenced contents").BoolVar(&c.snapshotGCDelete)
safetyFlagVar(cmd, &c.snapshotGCSafety)
}