Re: [PATCH v2 2/3] branch: give a more helpful message on redundant arguments
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jan 27, 2013, 11:58 UTC
- Message-ID
- <20130127115831.GE4228@elie.Belkin>
- In-Reply-To
- <1359118225-14356-2-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
Show 12 quoted lines
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -852,14 +852,14 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
> const char *branch_name;
> struct strbuf branch_ref = STRBUF_INIT;
>
> - if (detached)
> - die("Cannot give description to detached HEAD");
> - if (!argc)
> + if (!argc) {
> + if (detached)
> + die("Cannot give description to detached HEAD");Good catch. Shouldn't this bugfix be a separate patch, so it can also be included in maint?