summaryrefslogtreecommitdiff
path: root/ident.c
diff options
context:
space:
mode:
Diffstat (limited to 'ident.c')
-rw-r--r--ident.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ident.c b/ident.c
index 88e7f74e88..69a04b827d 100644
--- a/ident.c
+++ b/ident.c
@@ -196,6 +196,8 @@ const char *fmt_ident(const char *name, const char *email,
if (!name)
name = git_default_name;
if (!email)
+ email = getenv("EMAIL");
+ if (!email)
email = git_default_email;
if (!*name) {