Skip to content

Commit

Permalink
$EMAIL is a last resort fallback, as it's system-wide.
Browse files Browse the repository at this point in the history
$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.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Pierre Habouzit authored and Junio C Hamano committed Jun 6, 2007
1 parent d0f51a8 commit ec563e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ident.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec563e8

Please sign in to comment.