Skip to content

feat: drop apply --dry-run in favour of the diff verb#13

Merged
REPPL merged 4 commits into
mainfrom
feat/v0.8.0-drop-dry-run
Jul 8, 2026
Merged

feat: drop apply --dry-run in favour of the diff verb#13
REPPL merged 4 commits into
mainfrom
feat/v0.8.0-drop-dry-run

Conversation

@REPPL

@REPPL REPPL commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What

BREAKING (pre-1.0, no deprecation alias): removes the apply --dry-run flag.
ferry diff is now the single read-only preview.

diff already shares apply's buildPlan/printPlan, so its output is identical
to the old --dry-run. The field ships "what would apply change" as EITHER a
diff verb OR a --dry-run/-n flag — never both (git and chezmoi keep the
verb); ferry keeps the verb.

Changes

  • cmd/commands.go: removed the --dry-run flag registration.
  • cmd/apply.go: removed the dryRun read and the if dryRun { … } preview
    branch in runApply (it now goes straight to the mutating path);
    buildPlan/printPlan untouched. Reworded comments that named apply --dry-run.
  • cmd/context.go, evals/terminal_test.go: comment rewordings only.
  • evals/commands_test.go: replaced the optional dry-run probe with a positive
    regression test — apply --dry-run now errors with an unknown flag, the target
    stays unwritten, and ferry diff still previews write-free.
  • evals/terminal_config_test.go: the executed apply --dry-run becomes ferry diff.
  • CLI reference regenerated; CHANGELOG Breaking entry.

Verified

make build, gofmt -l . (empty), go vet ./..., go test ./..., and the full
eval suite all green. Behaviourally: ferry apply --dry-rununknown flag: --dry-run (exit 1); ferry diff previews normally.

REPPL and others added 4 commits July 8, 2026 19:07
BREAKING (pre-1.0, no alias): the `apply --dry-run` flag is removed. `ferry diff`
is the read-only preview — it already shares apply's buildPlan/printPlan, so the
output is identical. The field ships a preview as EITHER a diff verb OR a
--dry-run flag, never both; ferry keeps the verb.

Comments that advertised apply --dry-run as a preview path now point at diff; the
CLI reference is regenerated. Recorded under the CHANGELOG Breaking section.
@REPPL REPPL merged commit e9cdaf0 into main Jul 8, 2026
11 checks passed
@REPPL REPPL deleted the feat/v0.8.0-drop-dry-run branch July 8, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant