branch: reject -D/-d without branch name
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
50a6b54c03
commit
640d0401be
@ -837,9 +837,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
colopts = 0;
|
||||
}
|
||||
|
||||
if (delete)
|
||||
if (delete) {
|
||||
if (!argc)
|
||||
die(_("branch name required"));
|
||||
return delete_branches(argc, argv, delete > 1, kinds, quiet);
|
||||
else if (list) {
|
||||
} else if (list) {
|
||||
int ret = print_ref_list(kinds, detached, verbose, abbrev,
|
||||
with_commit, argv);
|
||||
print_columns(&output, colopts, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user