Skip to content

Commit

Permalink
ident.c: remove unused variables
Browse files Browse the repository at this point in the history
d5cc2de (ident.c: Trim hint printed when gecos is empty., 2006-11-28)
reworded the message used as printf() format and dropped "%s" from it;
these two variables that hold the names of GIT_{AUTHOR,COMMITTER}_NAME
environment variables haven't been used since then.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jan 8, 2010
1 parent d6f8fd0 commit 18e95f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ident.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ static int copy(char *buf, size_t size, int offset, const char *src)
return offset;
}

static const char au_env[] = "GIT_AUTHOR_NAME";
static const char co_env[] = "GIT_COMMITTER_NAME";
static const char *env_hint =
"\n"
"*** Please tell me who you are.\n"
Expand Down Expand Up @@ -204,7 +202,7 @@ const char *fmt_ident(const char *name, const char *email,

if ((warn_on_no_name || error_on_no_name) &&
name == git_default_name && env_hint) {
fprintf(stderr, env_hint, au_env, co_env);
fprintf(stderr, env_hint);
env_hint = NULL; /* warn only once */
}
if (error_on_no_name)
Expand Down

0 comments on commit 18e95f2

Please sign in to comment.