-
-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Labels
Description
Description
Commitizen fails if version_provider is set to scm and no files are changed (no changelog, no version number in files) a version bump
Steps to reproduce
- Create en empty repository with
git init testand change into itcd test - Add a configuration
cz.toml
[tool.commitizen]
version_provider = "scm"- Commit it with
git add cz.tomlandcz commit - Run
cz bump
bump: version 0.0.0 → 0.0.1
tag to create: 0.0.1
increment detected: PATCH
[main 16e057b] bump: version 0.0.0 → 0.0.1
1 file changed, 1 insertion(+), 1 deletion(-)
Done!- Add another file / make another changer with
touch foobar,git add foobarandcz commit - Run
cz bump
bump: version 0.0.1 → 0.0.2
tag to create: 0.0.2
increment detected: PATCH
2nd git.commit error: "On branch main
nothing to commit, working tree clean
"If I run cz bump --changelog the second time, there is no error.
Current behavior
cz bump fails if no changes (updated changelog, version number in files) are made during a version bump.
Desired behavior
cz bump should not fail if no changes (updated changelog, version number in files) are made during a version bump.
Screenshots
No response
Environment
Commitizen Version: 4.8.2
Python Version: 3.13.4 (main, Jun 3 2025, 15:34:24) [Clang 17.0.0 (clang-1700.0.13.3)]
Operating System: Darwin
mtvx, tuukkamustonen and stephen-dahl