mirror of
https://github.com/kopia/kopia.git
synced 2026-01-24 14:28:06 -05:00
* refactor(cli): deprecate `snapshot gc` command * replace `snapshot gc` in tests with `maintenance run`
17 lines
551 B
Go
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)
|
|
}
|