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?