Skip to content

Commit 42e71e9

Browse files
committed
feat(commitizen): document '--' double dash in '--help'
Signed-off-by: Adrian DC <[email protected]>
1 parent 0acd25f commit 42e71e9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: commitizen/cli.py

+6
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ def __call__(
162162
"default": 0,
163163
"help": "length limit of the commit message; 0 for no limit",
164164
},
165+
{
166+
"name": ["--"],
167+
"action": "store_true",
168+
"dest": "double_dash",
169+
"help": "Positional arguments separator (recommended)",
170+
},
165171
],
166172
},
167173
{

Diff for: tests/commands/test_commit_command/test_commit_command_shows_description_when_use_help_option.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz commit [-h] [--retry] [--no-retry] [--dry-run]
22
[--write-message-to-file FILE_PATH] [-s] [-a]
3-
[-l MESSAGE_LENGTH_LIMIT]
3+
[-l MESSAGE_LENGTH_LIMIT] [--]
44

55
create new commit
66

@@ -18,3 +18,4 @@ options:
1818
not told Git about are not affected.
1919
-l, --message-length-limit MESSAGE_LENGTH_LIMIT
2020
length limit of the commit message; 0 for no limit
21+
-- Positional arguments separator (recommended)

0 commit comments

Comments
 (0)