You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(website): document range-endpoint options and --dry-run
- usage/args.md: list --dry-run, the four range endpoint options, and a "Range selection" section.
- configuration/git.md: document the `start_at` / `start_after` / `end_at` / `end_before` keys.
- usage/examples.md: examples for the new endpoint options and --dry-run.
Copy file name to clipboardExpand all lines: website/docs/configuration/git.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,12 @@ limit_commits = 42
42
42
recurse_submodules = false
43
43
include_paths = ["src/", "doc/**/*.md"]
44
44
exclude_paths = ["unrelated/"]
45
+
46
+
# Range selection (optional; mutually exclusive with each other within a pair).
47
+
# start_at = "v1.0.0" # include this revision as the lower bound
48
+
# start_after = "v0.9.0" # exclude this revision; walk forward from its successor
49
+
# end_at = "v2.0.0" # include this revision as the upper bound
50
+
# end_before = "v2.1.0" # exclude this revision; stop before it
45
51
```
46
52
47
53
### conventional_commits
@@ -373,3 +379,27 @@ This setting takes priority over `include_paths`.
373
379
374
380
- If a commit touches both included and excluded paths, it **will be included**.
375
381
- If a commit **only** modifies files that match both `include_paths` and `exclude_paths`, it **will be excluded**.
382
+
383
+
## Range endpoints
384
+
385
+
Four _optional_ string keys select the commit range explicitly. `start_at` / `start_after` set the lower bound (inclusive / exclusive); `end_at` / `end_before` set the upper bound (inclusive / exclusive). Within each pair, at most one may be set. Any unspecified side falls back to its default (first commit on the left, `HEAD` on the right).
386
+
387
+
These config keys cannot be combined with the legacy range flags (`--latest`, `--current`, `--unreleased`, `--bump`, positional `A..B`). If a corresponding CLI option is passed, it takes precedence over the config key on the same side.
388
+
389
+
See the [command-line reference](../usage/args.md#range-selection) for the full surface, including how legacy flags map to endpoint pairs.
390
+
391
+
### start_at
392
+
393
+
`start_at` includes the given revision as the lower bound (`[start_at, ...`). The revision itself is part of the output. Any commits before it are excluded.
394
+
395
+
### start_after
396
+
397
+
`start_after` excludes the given revision; the walk starts from its successor (`(start_after, ...`). Equivalent to git's `A..` range syntax.
398
+
399
+
### end_at
400
+
401
+
`end_at` includes the given revision as the upper bound (`..., end_at]`). The revision itself is part of the output; commits after it are excluded.
402
+
403
+
### end_before
404
+
405
+
`end_before` excludes the given revision; the walk stops at its parent (`..., end_before)`). Useful for "everything up to but not including a tag."
Every git-cliff invocation selects a contiguous slice of history. The flags above are named shortcuts for picking the two endpoints of that slice, with inclusivity baked in. The four `--*-at` / `--*-before` / `--*-after` options make the endpoints (and their inclusivity) explicit.
|`--start-at X`|`start_at = "X"`| Include `X`; walk forward. `[X, ...`|
91
+
|`--start-after X`|`start_after = "X"`| Exclude `X`; walk forward. `(X, ...`|
92
+
|`--end-at Y`|`end_at = "Y"`| Include `Y`; walk back. `..., Y]`|
93
+
|`--end-before Y`|`end_before = "Y"`| Exclude `Y`; stop before it. `..., Y)`|
94
+
95
+
The naming convention: `*_at` is inclusive, `*_before` / `*_after` is exclusive. Within each pair, at most one may be set. The two pairs are independent, so any inclusivity combination is expressible. Unspecified sides fall back to the existing defaults (left = first commit, right = `HEAD`).
96
+
97
+
CLI values override config values on the same side, so a shared team config can be locally overridden without editing the file.
98
+
99
+
### Conflicts
100
+
101
+
-`--start-at` and `--start-after` cannot be combined; same for `--end-at` and `--end-before`.
102
+
- The new endpoint options cannot be combined with the legacy range flags (`--latest`, `--current`, `--unreleased`, `--bump`, positional `A..B`). Pick one style.
`--dry-run` prints the computed interval, the number of commits it covers, and the git revision range that will be walked, then exits without rendering a changelog:
The `range:` line uses the revisions you specified (math-interval notation; `[` / `]` are inclusive, `(` / `)` are exclusive). The `emitted:` line shows the git revision range actually passed to the walker, with revisions resolved to full commit SHAs.
0 commit comments