git-cliff icon indicating copy to clipboard operation
git-cliff copied to clipboard

"There is nothing to bump." warning missing when using --bumped-version with GIT_CLIFF__GIT__LIMIT_COMMITS=0 and --with-commit

Open skyfenton opened this issue 7 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Description of the bug

When the GIT_CLIFF__GIT__LIMIT_COMMITS environment variable is 0 and the --with-commit argument is given (to ignore the git history except for one future commit message), trying to get the next version with --bumped-version will not display a "There is nothing to bump." warning if the --with-commit message is not a conventional commit.

Steps To Reproduce

  1. Set the GIT_CLIFF__GIT__LIMIT_COMMITS environment variable to 0
  2. Run git-cliff --bumped-version --with-commit "test"
  3. No warning occurs, even though there is nothing to bump.

Expected behavior

If GIT_CLIFF__GIT__LIMIT_COMMITS=0 and the next version cannot be determined from the --with-commit message, the "There is nothing to bump." warning should be shown.

Screenshots / Logs

No response

Software information

  • Operating system: Debian 12 (Docker container)
  • Rust version: N/A
  • Project version: 2.10.0

Additional context

If GIT_CLIFF__GIT__LIMIT_COMMITS is anything other than 0 (i.e. at least one commit in the history is checked), the expected behavior succeeds and the warning will be shown only if the version cannot be bumped from the with-commit message.

skyfenton avatar Sep 19 '25 19:09 skyfenton

Hey @skyfenton!

What version of git-cliff are you running? I'm unable to reproduce this from main.

Here is what I tried:

  • From main:
GIT_CLIFF__GIT__LIMIT_COMMITS=0 cargo run -- --with-commit "feat: test" --config config/cliff.toml --bumped-version

Calculating next version from current version: v2.10.1
v2.11.0
  • From a fresh repo with a single commit:
GIT_CLIFF__GIT__LIMIT_COMMITS=0 git cliff --bumped-version --with-commit "test: test"

 WARN  git_cliff > "cliff.toml" is not found, using the default configuration
 WARN  git_cliff_core::config > No releases found, using 0.1.0 as the next version
0.1.0
  • From a fresh repo with a single commit and tag (v0.1.0):
GIT_CLIFF__GIT__LIMIT_COMMITS=0 git cliff --bumped-version --with-commit "test: test"

 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
v0.1.1

If you are still experiencing the same problem, I recommend set up a minimal repro example and contribute a test fixture to verify the behavior.

orhun avatar Nov 04 '25 10:11 orhun