From: Junio C Hamano Date: Tue, 16 Oct 2018 03:59:16 GMT Subject: Re: [PATCH 3/3] mingw: use domain information for default email Message-ID: In-Reply-To: <271a5f57cef00d24ee33e99839cf3890e561efe7.1539596822.git.gitgitgadget@gmail.com> "Johannes Schindelin via GitGitGadget" writes: > +char *mingw_query_user_email(void) > +{ > + return get_extended_user_info(NameUserPrincipal); > +} > + > ... > > +#ifndef query_user_email > +#define query_user_email() NULL > +#endif The three patches look sensible to me; will queue. You may already have audited our use of "struct passwd", "getpwnam()" and "getpwuid()"--I haven't. I think we use these only to learn user's email (to be used as the default ident) and home directory (to expand "git config --type=path"). If that is really the case, it may be a worthwhile clean-up to introduce our own API that offers these two exact functions, have the per-platform implementation of the API in compat/, and get rid of "struct passwd" and calls to getpw*() functions out of the core Git proper, to wean ourselves away from depending on POSIX too much. But of course that is a separate topic.