mirror of
https://github.com/git/git.git
synced 2024-11-25 19:04:18 +08:00
$EMAIL is a last resort fallback, as it's system-wide.
$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>
This commit is contained in:
parent
d0f51a8b2a
commit
ec563e8153
4
ident.c
4
ident.c
@ -195,10 +195,10 @@ const char *fmt_ident(const char *name, const char *email,
|
|||||||
setup_ident();
|
setup_ident();
|
||||||
if (!name)
|
if (!name)
|
||||||
name = git_default_name;
|
name = git_default_name;
|
||||||
if (!email)
|
|
||||||
email = getenv("EMAIL");
|
|
||||||
if (!email)
|
if (!email)
|
||||||
email = git_default_email;
|
email = git_default_email;
|
||||||
|
if (!email)
|
||||||
|
email = getenv("EMAIL");
|
||||||
|
|
||||||
if (!*name) {
|
if (!*name) {
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
Loading…
Reference in New Issue
Block a user