Skip to content

Commit dc44639

Browse files
Denton-Lgitster
authored andcommitted
branch: don't mix --edit-description
`git branch` accepts `--edit-description` in conjunction with other arguments. However, `--edit-description` is its own mode, similar to `--set-upstream-to`, which is also made mutually exclusive with other modes. Prevent `--edit-description` from being mixed with other modes. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6b70930 commit dc44639

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
695695
list = 1;
696696

697697
if (!!delete + !!rename + !!copy + !!new_upstream + !!show_current +
698-
list + unset_upstream > 1)
698+
list + edit_description + unset_upstream > 1)
699699
usage_with_options(builtin_branch_usage, options);
700700

701701
if (filter.abbrev == -1)

0 commit comments

Comments
 (0)