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

Re: [PATCH] Nice error message for empty idents

From
Junio C Hamano <junkio@cox.net>
Date
Feb 18, 2006, 18:55 UTC
Message-ID
<7vpslko5tl.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060218172731.GV31278@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> 	$ git-rev-list --help
> 	fatal: Not a git repository
Hmph, true.  Ideas?
> I agree that the error message itself is bad.
Show 7 quoted lines
> -	if (!*name || !*email)
> -		die("empty ident %s <%s> not allowed",
> -		    name, email);
> +	if (!*name)
> +		die("empty realname not allowed - please set a realname for your login or use GIT_AUTHOR_NAME");
> +	if (!*email)
> +		die("empty email not allowed - please set your GIT_AUTHOR_EMAIL to a non-empty value");

I've considered doing this, but didn't do it that way, because I could not figure out what to do with GIT_COMMITTER_NAME. Also it might make sense to suggest user.name configuration item in the error/help message. Ideas?

Previous: Petr BaudisNext: Junio C Hamano
Message 4 of 5 in “[RFC] empty ident?”
  1. Junio C HamanoFeb 18, 2006
  2. Nicolas Vilz 'niv'Feb 18, 2006
  3. Nice error message for empty identsPetr Baudis, Feb 18, 2006
  4. Junio C HamanoFeb 18, 2006
  5. Delay "empty ident" errors until they really matter.Junio C Hamano, Feb 19, 2006

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.