OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50a6b54
)
branch: reject -D/-d without branch name
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Mon, 28 Jan 2013 01:18:14 +0000
(08:18 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 30 Jan 2013 17:00:41 +0000
(09:00 -0800)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
patch
|
blob
|
history
diff --git
a/builtin/branch.c
b/builtin/branch.c
index
873f624
..
50fcacc
100644
(file)
--- a/
builtin/branch.c
+++ b/
builtin/branch.c
@@
-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);