Re: [PATCH] branch: reject -D/-d without branch name
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jan 25, 2013, 08:45 UTC
- Message-ID
- <vpqmwvxhcra.fsf@grenoble-inp.fr>
- In-Reply-To
- <1359102416-1240-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 13 quoted lines
> 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)?
-- Matthieu Moy http://www-verimag.imag.fr/~moy/