diff --git a/bumpversion/scm.py b/bumpversion/scm.py index 43f1e16c..f5a2272b 100644 --- a/bumpversion/scm.py +++ b/bumpversion/scm.py @@ -177,9 +177,6 @@ def commit_to_scm( @classmethod def tag_in_scm(cls, config: "Config", context: MutableMapping, dry_run: bool = False) -> None: """Tag the current commit in the source code management system.""" - if not config.commit: - logger.info("Would not tag since we are not committing") - return if not config.tag: logger.info("Would not tag") return diff --git a/tests/test_scm.py b/tests/test_scm.py index ed0bab0a..1f93eb44 100644 --- a/tests/test_scm.py +++ b/tests/test_scm.py @@ -160,7 +160,7 @@ def test_commit_and_tag_from_below_scm_root(repo: str, scm_command: str, scm_cla [ param(True, True, True, False, False, id="dry-run-stops-commit-and-tag"), param(True, False, False, True, False, id="commit-no-tag"), - param(False, True, False, False, False, id="no-commit-stops-tag"), + param(False, True, False, False, True, id="no-commit-will-tag"), ], ) def test_commit_tag_dry_run_interactions(