Skip to content

Commit 1044b1f

Browse files
Michael J Grubergitster
authored andcommitted
commit: reword --author error message
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 <[email protected]> Helped-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 282616c commit 1044b1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ static const char *find_author_by_nickname(const char *name)
999999
clear_mailmap(&mailmap);
10001000
return strbuf_detach(&buf, NULL);
10011001
}
1002-
die(_("No existing author found with '%s'"), name);
1002+
die(_("--author '%s' is not 'Name <email>' and matches no existing author"), name);
10031003
}
10041004

10051005

0 commit comments

Comments
 (0)