ident.c: Trim hint printed when gecos is empty.
Also remove asterisks for readability, and suggest use of git-config for easy cut & pasting. Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl> Signed-off-by: Junio C Hamano <junkio@cox.net>
Han-Wen Nienhuys committed
Nov 28, 2006 at 11:27 UTC
d5cc2de9ff57d2f6734f6e6e34addc2fae1b5b0e
1 file changed
+10
-5
ident.c
+10
-5
@@ -158,12 +158,17 @@ static int copy(char *buf, int size, int offset, const char *src)
158
static const char au_env[] = "GIT_AUTHOR_NAME";
159
static const char co_env[] = "GIT_COMMITTER_NAME";
160
static const char *env_hint =
161
-"\n*** Environment problem:\n"
161
+"\n"
162
"*** Your name cannot be determined from your system services (gecos).\n"
163
-"*** You would need to set %s and %s\n"
164
-"*** environment variables; otherwise you won't be able to perform\n"
165
-"*** certain operations because of \"empty ident\" errors.\n"
166
-"*** Alternatively, you can use user.name configuration variable.\n\n";
163
+"\n"
164
+"Run\n"
165
+"\n"
166
+" git repo-config user.email \"you@email.com\"\n"
167
+" git repo-config user.name \"Your Name\"\n"
168
+"\n"
169
+"To set the identity in this repository.\n"
170
+"Add --global to set your account\'s default\n"
171
+"\n";
172
173
static const char *get_ident(const char *name, const char *email,
174
const char *date_str, int error_on_no_name)