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>
diff --git a/compat/mingw.c b/compat/mingw.c
index 9055471..45c8046 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1796,6 +1796,11 @@ static char *get_extended_user_info(enum EXTENDED_NAME_FORMAT type)
return NULL;
}
+char *mingw_query_user_email(void)
+{
+ return get_extended_user_info(NameUserPrincipal);
+}
+
struct passwd *getpwuid(int uid)
{
static unsigned initialized;