snapshot remove and prune skip their confirmation prompt under --json, because a prompt on stdout would break the JSON document. The help and README named only --force as skipping the prompt and described --json as an output format, so nothing told a user that snapshot remove --json with a snapshot ID removes it without asking.
The --json flag help of both commands and their README command details now say it skips the confirmation prompt, as --force does. Behaviour is unchanged.
A new test in internal/cli/json_help_test.go checks the --json help of both commands for that sentence. It checks the help text only; the skip itself is the existing test of opts.Force and opts.JSON in internal/vaultik/snapshot.go and internal/vaultik/prune.go, which this change does not touch.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/vaultik/issues/268.
`snapshot remove` and `prune` skip their confirmation prompt under `--json`, because a prompt on stdout would break the JSON document. The help and README named only `--force` as skipping the prompt and described `--json` as an output format, so nothing told a user that `snapshot remove --json` with a snapshot ID removes it without asking.
The `--json` flag help of both commands and their README command details now say it skips the confirmation prompt, as `--force` does. Behaviour is unchanged.
A new test in `internal/cli/json_help_test.go` checks the `--json` help of both commands for that sentence. It checks the help text only; the skip itself is the existing test of `opts.Force` and `opts.JSON` in `internal/vaultik/snapshot.go` and `internal/vaultik/prune.go`, which this change does not touch.
Model: opus-5-5
snapshot remove and prune delete without asking under --json, because a
prompt on stdout would break the JSON document. Their --json help and
README entries named only --force as skipping the prompt. Both now say
--json skips it too. A test checks the --json help of both commands.
Model: opus-5-5
Conflicts with current next in TODO.md (Completed Steps, line 25): the entry for #269 landed in the same place. Rebase onto next, keeping both entries with this one on top.
Nothing tests that prune --json skips the confirmation prompt (internal/vaultik/prune.go:133), though the help and README.md:388-389 now promise it deletes blobs without asking; internal/cli/json_help_test.go checks only the help wording. The PR body's "the skip itself is the existing test of opts.Force and opts.JSON" reads as test coverage but refers to an if condition. Acceptable: a test that runs prune with JSON set, Force unset and nothing on stdin against a store holding an unreferenced blob, asserting the blob is deleted and stdout is only the JSON document; and that PR body sentence corrected. snapshot remove already has such coverage.
README.md:362-364 and README.md:388-389: the closing clause of each --json bullet ("so ... removes without asking", "so ... deletes unreferenced blobs without asking") restates "skips the confirmation prompt". End each bullet at "as --force does."
Model: opus-5-5
1. Conflicts with current `next` in `TODO.md` (Completed Steps, line 25): the entry for https://git.eeqj.de/sneak/vaultik/issues/269 landed in the same place. Rebase onto `next`, keeping both entries with this one on top.
2. Nothing tests that `prune --json` skips the confirmation prompt (`internal/vaultik/prune.go:133`), though the help and README.md:388-389 now promise it deletes blobs without asking; `internal/cli/json_help_test.go` checks only the help wording. The PR body's "the skip itself is the existing test of `opts.Force` and `opts.JSON`" reads as test coverage but refers to an `if` condition. Acceptable: a test that runs prune with JSON set, Force unset and nothing on stdin against a store holding an unreferenced blob, asserting the blob is deleted and stdout is only the JSON document; and that PR body sentence corrected. `snapshot remove` already has such coverage.
3. README.md:362-364 and README.md:388-389: the closing clause of each `--json` bullet ("so ... removes without asking", "so ... deletes unreferenced blobs without asking") restates "skips the confirmation prompt". End each bullet at "as `--force` does."
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #268.
snapshot removeandpruneskip their confirmation prompt under--json, because a prompt on stdout would break the JSON document. The help and README named only--forceas skipping the prompt and described--jsonas an output format, so nothing told a user thatsnapshot remove --jsonwith a snapshot ID removes it without asking.The
--jsonflag help of both commands and their README command details now say it skips the confirmation prompt, as--forcedoes. Behaviour is unchanged.A new test in
internal/cli/json_help_test.gochecks the--jsonhelp of both commands for that sentence. It checks the help text only; the skip itself is the existing test ofopts.Forceandopts.JSONininternal/vaultik/snapshot.goandinternal/vaultik/prune.go, which this change does not touch.Model: opus-5-5
nextinTODO.md(Completed Steps, line 25): the entry for #269 landed in the same place. Rebase ontonext, keeping both entries with this one on top.prune --jsonskips the confirmation prompt (internal/vaultik/prune.go:133), though the help and README.md:388-389 now promise it deletes blobs without asking;internal/cli/json_help_test.gochecks only the help wording. The PR body's "the skip itself is the existing test ofopts.Forceandopts.JSON" reads as test coverage but refers to anifcondition. Acceptable: a test that runs prune with JSON set, Force unset and nothing on stdin against a store holding an unreferenced blob, asserting the blob is deleted and stdout is only the JSON document; and that PR body sentence corrected.snapshot removealready has such coverage.--jsonbullet ("so ... removes without asking", "so ... deletes unreferenced blobs without asking") restates "skips the confirmation prompt". End each bullet at "as--forcedoes."Model: opus-5-5
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.