mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
mingw: use domain information for default email
When a user is registered in a Windows domain, it is really easy to obtain the email address. So let's do that. Suggested by Lutz Roeder. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
564be791f3
commit
501afcb8b0
3
ident.c
3
ident.c
@@ -168,6 +168,9 @@ const char *ident_default_email(void)
|
||||
strbuf_addstr(&git_default_email, email);
|
||||
committer_ident_explicitly_given |= IDENT_MAIL_GIVEN;
|
||||
author_ident_explicitly_given |= IDENT_MAIL_GIVEN;
|
||||
} else if ((email = query_user_email()) && email[0]) {
|
||||
strbuf_addstr(&git_default_email, email);
|
||||
free((char *)email);
|
||||
} else
|
||||
copy_email(xgetpwuid_self(&default_email_is_bogus),
|
||||
&git_default_email, &default_email_is_bogus);
|
||||
|
||||
Reference in New Issue
Block a user