$EMAIL is a last resort fallback, as it's system-wide.
[git/git.git] / ident.c
diff --git a/ident.c b/ident.c
index 69a04b8..3d49608 100644 (file)
--- 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;