Is your feature request related to a problem? Please describe.
Currently, --latest
option is supported, but it's a bit difficult to use.
Suppose this situation:
- First,
v0.10.0-test
is released
- After that,
v0.11.0-test
is released
- After that, a bug was found and
v0.10.1-test
is released
Then the current behaviors are:
$ git checkout v0.10.0-test
$ git cliff | head
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.0-test] - 2021-11-28
### Features
- Add A
## [0.9.0-test] - 2021-11-25
$ git cliff --latest
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.1-test] - 2021-11-28
### Bug Fixes
- Fix A
<!-- generated by git-cliff -->
$ git checkout v0.11.0-test
$ git cliff | head
# Changelog
All notable changes to this project will be documented in this file.
## [0.11.0-test] - 2021-11-28
### Features
- Add B
## [0.10.0-test] - 2021-11-28
$ git cliff --latest
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.1-test] - 2021-11-28
### Bug Fixes
- Fix A
<!-- generated by git-cliff -->
$ git checkout v0.10.1-test
$ git cliff | head
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.1-test] - 2021-11-28
### Bug Fixes
- Fix A
## [0.10.0-test] - 2021-11-28
$ git cliff --latest
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.1-test] - 2021-11-28
### Bug Fixes
- Fix A
<!-- generated by git-cliff -->
I want an option that extracts commits that are in only one release based on the current branch, but I guess there is nothing like that.
I believe it's useful for generating the body for GitHub Releases like you show here.
Currently, you use --latest
for this, but since what --latest
points to will change, it's difficult to use correctly.
Describe the solution you'd like
A clear and concise description of what you want to happen.
I guess adding --current
option can solve this problem.
It behaves like this:
$ git checkout v0.10.0-test
$ git cliff --current
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.0-test] - 2021-11-28
### Features
- Add A
<!-- generated by git-cliff -->
$ git checkout v0.11.0-test
$ git cliff --current
# Changelog
All notable changes to this project will be documented in this file.
## [0.11.0-test] - 2021-11-28
### Features
- Add B
<!-- generated by git-cliff -->
$ git checkout v0.10.1-test
$ git cliff --current
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.1-test] - 2021-11-28
### Bug Fixes
- Fix A
<!-- generated by git-cliff -->
Describe alternatives you've considered
Extracting the section of the current release using some text processing tools can achieve the same thing, but it's a bit troublesome.
Additional context
If I switch the order of creating tags, for example v0.11.0-test
after v0.10.1-test
, --latest
will point to v0.11.0-test
, so I feel it's hard to estimate.