git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCHv2] commit: reword --author error message

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 26, 2015, 15:48 UTC
Message-ID
<7e2e1d1e7f4a25d84a6f7a1c0cb035221529f189.1422286879.git.git@drmicha.warpmail.net>
In-Reply-To
<xmqqfvba1p07.fsf@gitster.dls.corp.google.com>

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>
---
There's really not much by me in this patch any more...
Everyone on cc contributed - bikeshedding in its best, productive form!
BTW: How do you pull cc/msgid from the list into format-patch/send-email most effectively?
(granted that I move away from gmane/nntp, which is likely)
 builtin/commit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index 7d90c35..240423b 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(_("--author '%s': neither 'Name <email>' nor a match for an existing author"), name);
 }
 
 
-- 
2.3.0.rc1.222.gae238f2
Previous: Junio C HamanoNext: Jeff King
Message 16 of 21 in “commit --amend --author error”
  1. Gunnar WagnerJan 13, 2015
  2. Michael J GruberJan 13, 2015
  3. Jeff KingJan 14, 2015
  4. Michael J GruberJan 15, 2015
  5. commit: reword --author error messageMichael J Gruber, Jan 15, 2015
  6. Michael J GruberJan 15, 2015
  7. Jeff KingJan 15, 2015
  8. Michael J GruberJan 15, 2015
  9. Junio C HamanoJan 15, 2015
  10. Jeff KingJan 16, 2015
  11. Junio C HamanoJan 16, 2015
  12. Philip OakleyJan 16, 2015
  13. Junio C HamanoJan 16, 2015
  14. Eric SunshineJan 16, 2015
  15. Junio C HamanoJan 16, 2015
  16. [PATCHv2] commit: reword --author error messageMichael J Gruber, Jan 26, 2015
  17. Jeff KingJan 26, 2015
  18. Junio C HamanoJan 27, 2015
  19. Jeff KingJan 27, 2015
  20. Philip OakleyJan 27, 2015
  21. Ramsay JonesJan 27, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.