From: Duy Nguyen <pclouds@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] branch: reject -D/-d without branch name
Date: Fri, 25 Jan 2013 15:56:41 +0700 [thread overview]
Message-ID: <CACsJy8AyDKEFG511e70vB7YrwLP4xoWmE34tqazMZA59hs6iHA@mail.gmail.com> (raw)
In-Reply-To: <vpqmwvxhcra.fsf@grenoble-inp.fr>
On Fri, Jan 25, 2013 at 3:45 PM, Matthieu Moy
<Matthieu.Moy@grenoble-inp.fr> wrote:
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> 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,
>
> Shouldn't this error out with a clean error message ("branch name
> expected" or so)?
Yeah. But on the other hand, this command seems to prefer to print
help usage when incorrect number of arguments is given (checkout
blocks "if (edit_description)" and "if (rename)" in cmd_branch).
Should those be fixed too?
--
Duy
next prev parent reply other threads:[~2013-01-25 8:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACsJy8AyDKEFG511e70vB7YrwLP4xoWmE34tqazMZA59hs6iHA@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).