Re: [PATCH] commit: reword --author error message
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Jan 15, 2015, 14:25 UTC
- Message-ID
- <54B7CDD4.2010306@drmicha.warpmail.net>
- In-Reply-To
- <84cf10a22858275d6e213311c93df7f6a5408f60.1421331608.git.git@drmicha.warpmail.net>
Michael J Gruber schrieb am 15.01.2015 um 15:23:
> If an --author argument is specified but does not contain a '>' then git tries > to find the argument within the exiting authors; and gives the error > message "No existing author found with '%s'" if there is no match.
Oh well, I'm bracing already for the comments on that entertaining typo... Can I buy an 's', please?
Show 30 quoted lines
> This is confusing for users who try to specify a valid complete author
> name.
>
> Rename the error message to make it clearer that the failure has two
> reasons in this case:
> "Bad --author parameter '%s': neither completely wellformed nor part of
> an existing one"
>
> (This codepath is touched only when we know already that the argument
> cannot be a completely wellformed author ident.)
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> builtin/commit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 7d90c35..851e2c5 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1056,7 +1056,7 @@ static const char *find_author_by_nickname(const char *name)
> clear_mailmap(&mailmap);
> return strbuf_detach(&buf, NULL);
> }
> - die(_("No existing author found with '%s'"), name);
> + die(_("Bad --author parameter '%s': neither completely wellformed nor part of an existing one"), name);
> }
>
>
>