Skip to content

Commit

Permalink
commit: reword --author error message
Browse files Browse the repository at this point in the history
If an --author argument is specified but does not contain a '>' then git tries
to find the argument within the existing authors; and gives the error
message "No existing author found with '%s'" if there is no match.

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.

(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>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Jan 27, 2015
1 parent 282616c commit 1044b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,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(_("--author '%s' is not 'Name <email>' and matches no existing author"), name);
}


Expand Down

0 comments on commit 1044b1f

Please sign in to comment.