From: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] branch: change the error messages to be more meaningful
Date: Mon, 02 Oct 2017 22:49:46 +0530 [thread overview]
Message-ID: <1506964786.3504.3.camel@gmail.com> (raw)
In-Reply-To: <20170821133608.5652-1-kaarticsivaraam91196@gmail.com>
On Mon, 2017-08-21 at 19:06 +0530, Kaartic Sivaraam wrote:
> The error messages shown when the branch command is misused
> by supplying it wrong number of parameters wasn't meaningful.
> That's because it used the the phrase "too many branches"
> assuming all parameters to be "valid" branch names. It's not
> always the case as exemplified below,
>
> $ git branch
> foo
> * master
>
> $ git branch -m foo foo old
> fatal: too many branches for a rename operation
>
> Change the messages to be more general thus making no assumptions
> about the "parameters".
>
> Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
> ---
> Changes in v2:
>
> - changed the wordings of the error message
>
> builtin/branch.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/builtin/branch.c b/builtin/branch.c
> index a3bd2262b..62981d358 100644
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -707,12 +707,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
> else if (argc == 2)
> rename_branch(argv[0], argv[1], rename > 1);
> else
> - die(_("too many branches for a rename operation"));
> + die(_("too many arguments for a rename operation"));
> } else if (new_upstream) {
> struct branch *branch = branch_get(argv[0]);
>
> if (argc > 1)
> - die(_("too many branches to set new upstream"));
> + die(_("too many arguments to set new upstream"));
>
> if (!branch) {
> if (!argc || !strcmp(argv[0], "HEAD"))
> @@ -735,7 +735,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
> struct strbuf buf = STRBUF_INIT;
>
> if (argc > 1)
> - die(_("too many branches to unset upstream"));
> + die(_("too many arguments to unset upstream"));
>
> if (!branch) {
> if (!argc || !strcmp(argv[0], "HEAD"))
I was recently searching to find the patches have gone missing in to
the void for no obvious reason and found this. Should I consider this
to be "Dropped" in terms of the "What's cooking" emails? or has this
just not received the required attention?
---
Kaartic
next prev parent reply other threads:[~2017-10-02 17:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 14:39 [PATCH] branch: change the error messages to be more meaningful Kaartic Sivaraam
2017-07-25 18:28 ` Kaartic Sivaraam
2017-07-25 18:31 ` Kaartic Sivaraam
2017-07-30 11:59 ` Kaartic Sivaraam
2017-08-21 13:36 ` [PATCH v2] " Kaartic Sivaraam
2017-10-02 17:19 ` Kaartic Sivaraam [this message]
2017-10-03 0:21 ` Junio C Hamano
2017-10-03 19:14 ` Kaartic Sivaraam
2017-10-04 4:11 ` Junio C Hamano
2017-10-04 12:46 ` Kaartic Sivaraam
2017-10-05 1:13 ` Junio C Hamano
2017-10-05 12:13 ` Kaartic Sivaraam
-- strict thread matches above, loose matches on Subject: below --
2017-07-15 8:33 [PATCH] commit & merge: modularize the empty message validator Kaartic Sivaraam
2017-08-21 13:34 ` [PATCH v2] branch: change the error messages to be more meaningful Kaartic Sivaraam
2017-08-21 13:52 ` Kaartic Sivaraam
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1506964786.3504.3.camel@gmail.com \
--to=kaarticsivaraam91196@gmail.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).