diff
diff <files…> --base <gitref> compares each .feature file’s working-tree text against its text
at --base and classifies every scenario as added, modified, removed, or unchanged. It
carries an addOnly aggregate — true when the change introduces only new scenarios and touches
no existing one. This is the primitive an additive-only detector needs: addOnly: true means a
purely additive change; any modified/removed means an existing scenario was touched.
gherkin-cli diff features/login.feature --base HEAD~1| Flag | Description |
|---|---|
--base <ref> | Base git ref to compare against (required). |
--full | Include unchanged scenarios in full detail. |
--format <fmt> | Output format: toon (default) or json. |
Behavior
Section titled “Behavior”- Scenario identity is the scenario name within its feature — a rename reads as add + remove.
modifiedmeans same name, but steps, tags, or examples differ.- Base text is read via git (
git show <ref>:<path>); a git/ref failure fails loud (EGIT, exit1). - A brand-new file (absent at base) is entirely additive: every scenario is
added, andaddOnlyistrue. - Aggregate
summary {added, modified, removed, unchanged, files, addOnly}; each file also carries its ownaddOnly.
See also
Section titled “See also”- parse — project a suite into a compact digest.
- validate — check well-formedness with a gating exit code.
- diff — the same classification as an imported function.
- AXI output contract — the shared conventions behind this output.