summaryrefslogtreecommitdiff
path: root/ident.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-21 19:10:11 -0400
committerJunio C Hamano <gitster@pobox.com>2012-05-22 09:07:54 -0700
commitb9f0ac1710ed1d2dc865ab40893720e9a242e362 (patch)
treefd1a63c65b966f9f3cc99da8b9ec8d90519153ca /ident.c
parent43ae9f47ab8a7762d914e91d6f57b79126986640 (diff)
downloadgit-b9f0ac1710ed1d2dc865ab40893720e9a242e362.tar.gz
fmt_ident: drop IDENT_WARN_ON_NO_NAME code
There are no more callers who want this, so we can drop it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ident.c')
-rw-r--r--ident.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ident.c b/ident.c
index acb3a0843f..3b92c44654 100644
--- a/ident.c
+++ b/ident.c
@@ -316,7 +316,6 @@ const char *fmt_ident(const char *name, const char *email,
char date[50];
int i;
int error_on_no_name = (flag & IDENT_ERROR_ON_NO_NAME);
- int warn_on_no_name = (flag & IDENT_WARN_ON_NO_NAME);
int name_addr_only = (flag & IDENT_NO_DATE);
if (!name)
@@ -327,13 +326,11 @@ const char *fmt_ident(const char *name, const char *email,
if (!*name) {
struct passwd *pw;
- if ((warn_on_no_name || error_on_no_name) &&
- name == git_default_name && env_hint) {
- fputs(env_hint, stderr);
- env_hint = NULL; /* warn only once */
- }
- if (error_on_no_name)
+ if (error_on_no_name) {
+ if (name == git_default_name)
+ fputs(env_hint, stderr);
die("empty ident %s <%s> not allowed", name, email);
+ }
pw = getpwuid(getuid());
if (!pw)
die("You don't exist. Go away!");