Skip to content

Commit 0ca85f3

Browse files
committed
fix(commit): emit deprecated warning of cz commit -s
1 parent 59fd3f5 commit 0ca85f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

commitizen/commands/commit.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def __call__(self):
111111
write_message_to_file: bool = self.arguments.get("write_message_to_file")
112112
signoff: bool = self.arguments.get("signoff")
113113

114+
if signoff:
115+
out.warn(
116+
"Deprecated warning: `cz commit -s` is deprecated and will be removed in v5, please use `cz commit -- -s` instead."
117+
)
118+
114119
if self.arguments.get("all"):
115120
git.add("-u")
116121

@@ -133,11 +138,6 @@ def __call__(self):
133138
if dry_run:
134139
raise DryRunExit()
135140

136-
if signoff:
137-
out.warn(
138-
"signoff mechanic is deprecated, please use `cz commit -- -s` instead."
139-
)
140-
141141
if self.config.settings["always_signoff"] or signoff:
142142
extra_args = f"{extra_args} -s".strip()
143143

0 commit comments

Comments
 (0)