From: Junio C Hamano Date: Sat, 16 Jun 2007 06:33:06 +0000 (-0700) Subject: $EMAIL is a last resort fallback, as it's system-wide. X-Git-Tag: v1.5.2.2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1367214417ee55266ab951cf198bf1aa7e051965;p=git.git $EMAIL is a last resort fallback, as it's system-wide. $EMAIL is a system-wide setup that is used for many many many applications. If the git user chose a specific user.email setup, then _this_ should be honoured rather than $EMAIL. [jc: cherry-picked ec563e8 from 'master'] Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- diff --git a/ident.c b/ident.c index 69a04b827..3d49608e6 100644 --- a/ident.c +++ b/ident.c @@ -195,10 +195,10 @@ const char *fmt_ident(const char *name, const char *email, setup_ident(); if (!name) name = git_default_name; - if (!email) - email = getenv("EMAIL"); if (!email) email = git_default_email; + if (!email) + email = getenv("EMAIL"); if (!*name) { struct passwd *pw;