From 28a94f885a735e7474357698ec384de24d526620 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 28 Apr 2007 18:40:28 -0700 Subject: Fall back to $EMAIL for missing GIT_AUTHOR_EMAIL and GIT_COMMITTER_EMAIL Some other programs get the user's email address from $EMAIL, so fall back to that if we don't have a Git-specific email address. Signed-off-by: Josh Triplett Signed-off-by: Junio C Hamano --- ident.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ident.c') diff --git a/ident.c b/ident.c index 88e7f74e88..69a04b827d 100644 --- a/ident.c +++ b/ident.c @@ -195,6 +195,8 @@ 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; -- cgit v1.2.3