From: Matthieu Moy Date: Tue, 13 Aug 2013 08:29:14 GMT Subject: Re: git should not use a default user.email config value Message-ID: In-Reply-To: Felipe Contreras writes: > This is how to implement that: > > From f1feaa05ce3772d8006078c4aeabcbd55b52d58e Mon Sep 17 00:00:00 2001 > From: Felipe Contreras 2nd > Date: Tue, 13 Nov 2012 07:33:12 +0100 > Subject: [PATCH] ident: don't allow implicit email addresses > > Signed-off-by: Felipe Contreras > --- > ident.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ident.c b/ident.c > index 1c123e6..85fc729 100644 > --- a/ident.c > +++ b/ident.c > @@ -301,9 +301,9 @@ const char *fmt_ident(const char *name, const char *email, > } > > if (strict && email == git_default_email.buf && > - strstr(email, "(none)")) { > + !(user_ident_explicitly_given & IDENT_MAIL_GIVEN)) { > fputs(env_hint, stderr); > - die("unable to auto-detect email address (got '%s')", email); > + die("no explicit email address"); > } > > if (want_date) { That's a first step, but something should also be done in builtin/commit.c, which currently displays a detailed warning (implicit_ident_advice) /after/ performing the commit. I think your patch would turn this warning into dead code. -- Matthieu Moy http://www-verimag.imag.fr/~moy/