git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] branch: reject -D/-d without branch name
@ 2013-01-25  8:26 Nguyễn Thái Ngọc Duy
  2013-01-25  8:45 ` Matthieu Moy
  2013-01-25 12:50 ` [PATCH v2 1/3] " Nguyễn Thái Ngọc Duy
  0 siblings, 2 replies; 14+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2013-01-25  8:26 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Nguyễn Thái Ngọc Duy


Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/branch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index 873f624..1d3e842 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -837,7 +837,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 		colopts = 0;
 	}
 
-	if (delete)
+	if (delete && argc)
 		return delete_branches(argc, argv, delete > 1, kinds, quiet);
 	else if (list) {
 		int ret = print_ref_list(kinds, detached, verbose, abbrev,
-- 
1.8.1.1.380.g782aa97

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-01-28  1:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25  8:26 [PATCH] branch: reject -D/-d without branch name Nguyễn Thái Ngọc Duy
2013-01-25  8:45 ` Matthieu Moy
2013-01-25  8:56   ` Duy Nguyen
2013-01-25 12:50 ` [PATCH v2 1/3] " Nguyễn Thái Ngọc Duy
2013-01-25 12:50   ` [PATCH v2 2/3] branch: give a more helpful message on redundant arguments Nguyễn Thái Ngọc Duy
2013-01-27 11:58     ` Jonathan Nieder
2013-01-25 12:50   ` [PATCH v2 3/3] branch: mark more strings for translation Nguyễn Thái Ngọc Duy
2013-01-27 11:55     ` Jonathan Nieder
2013-01-25 19:04   ` [PATCH v2 1/3] branch: reject -D/-d without branch name Junio C Hamano
2013-01-26  3:12     ` Duy Nguyen
2013-01-28  1:18   ` [PATCH v3 1/4] branch: no detached HEAD check when editing another branch's description Nguyễn Thái Ngọc Duy
2013-01-28  1:18     ` [PATCH v3 2/4] branch: reject -D/-d without branch name Nguyễn Thái Ngọc Duy
2013-01-28  1:18     ` [PATCH v3 3/4] branch: give a more helpful message on redundant arguments Nguyễn Thái Ngọc Duy
2013-01-28  1:18     ` [PATCH v3 4/4] branch: mark more strings for translation Nguyễn Thái Ngọc Duy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).