Skip to contentSkip to conversation

$EMAIL is a last resort fallback, as it's system-wide.

PATCH In review Pierre Habouzit 1 participant 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 $EMAIL is a last resort fallback, as it's system-wide.

From: Pierre Habouzit <[email protected]>

Rationale: $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.

---
 ident.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ident.c +2 -2
index 69a04b8..3d49608 100644
@@ -196,9 +196,9 @@ 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 (!email)
+		email = getenv("EMAIL");
 
 	if (!*name) {
 		struct passwd *pw;
Signature · 1 line
1.5.2.1
#1 lore raw

Eeeew sorry for the repost, I sent the bad patch with git send-email.
my mistake.

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org