ident: reword empty ident error message
authorJeff King <peff@peff.net>
Thu, 24 May 2012 23:26:32 +0000 (19:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 May 2012 00:16:34 +0000 (17:16 -0700)
There's on point in printing the name, since it is by
definition the empty string if we have reached this code
path. Instead, let's be more clear that we are complaining
about the empty name, but still show the email address that
it is attached to (since that may provide some context to
the user).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ident.c
diff --git a/ident.c b/ident.c
index e279039ac526503587bb6723b12181f70b9dbb6a..f5160e1f43bf06aaf2cddfc2fe66f8d463c3f6cc 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -281,7 +281,7 @@ const char *fmt_ident(const char *name, const char *email,
                if (error_on_no_name) {
                        if (name == git_default_name.buf)
                                fputs(env_hint, stderr);
                if (error_on_no_name) {
                        if (name == git_default_name.buf)
                                fputs(env_hint, stderr);
-                       die("empty ident %s <%s> not allowed", name, email);
+                       die("empty ident name (for <%s>) not allowed", email);
                }
                pw = xgetpwuid_self();
                name = pw->pw_name;
                }
                pw = xgetpwuid_self();
                name = pw->pw_name;