@@ -200,21 +200,10 @@ def __call__(self) -> None: # noqa: C901
200200 scheme = self .scheme ,
201201 )
202202
203- is_initial = self .is_initial_tag (current_tag_version , is_yes )
204- if is_initial :
205- commits = git .get_commits ()
206- else :
207- commits = git .get_commits (current_tag_version )
208-
209203 # If user specified changelog_to_stdout, they probably want the
210204 # changelog to be generated as well, this is the most intuitive solution
211205 self .changelog = self .changelog or bool (self .changelog_to_stdout )
212206
213- # No commits, there is no need to create an empty tag.
214- # Unless we previously had a prerelease.
215- if not commits and not current_version .is_prerelease :
216- raise NoCommitsFoundError ("[NO_COMMITS_FOUND]\n " "No new commits found." )
217-
218207 if manual_version :
219208 try :
220209 new_version = self .scheme (manual_version )
@@ -225,6 +214,17 @@ def __call__(self) -> None: # noqa: C901
225214 ) from exc
226215 else :
227216 if increment is None :
217+ is_initial = self .is_initial_tag (current_tag_version , is_yes )
218+ if is_initial :
219+ commits = git .get_commits ()
220+ else :
221+ commits = git .get_commits (current_tag_version )
222+
223+ # No commits, there is no need to create an empty tag.
224+ # Unless we previously had a prerelease.
225+ if not commits and not current_version .is_prerelease :
226+ raise NoCommitsFoundError ("[NO_COMMITS_FOUND]\n " "No new commits found." )
227+
228228 increment = self .find_increment (commits )
229229
230230 # It may happen that there are commits, but they are not eligible
0 commit comments