Skip to content

Commit 1367214

Browse files
committed
$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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fadf488 commit 1367214

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ident.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ const char *fmt_ident(const char *name, const char *email,
195195
setup_ident();
196196
if (!name)
197197
name = git_default_name;
198-
if (!email)
199-
email = getenv("EMAIL");
200198
if (!email)
201199
email = git_default_email;
200+
if (!email)
201+
email = getenv("EMAIL");
202202

203203
if (!*name) {
204204
struct passwd *pw;

0 commit comments

Comments
 (0)