git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] mingw: use domain information for default email

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2018, 03:59 UTC
Message-ID
<xmqqbm7u35kb.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<271a5f57cef00d24ee33e99839cf3890e561efe7.1539596822.git.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 10 quoted lines
> +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.
Previous: Johannes Schindelin
Message 12 of 12 in “Provide a useful default user ident on Windows”
  1. 0/3 Provide a useful default user ident on WindowsJohannes Schindelin via GitGitGadget, Oct 15, 2018
  2. 1/3 getpwuid(mingw): initialize the structure only onceJohannes Schindelin via GitGitGadget, Oct 15, 2018
  3. Eric SunshineOct 15, 2018
  4. 2/3 getpwuid(mingw): provide a better default for the user nameJohannes Schindelin via GitGitGadget, Oct 15, 2018
  5. Eric SunshineOct 15, 2018
  6. Johannes SchindelinOct 16, 2018
  7. Eric SunshineOct 16, 2018
  8. Johannes SchindelinOct 16, 2018
  9. 3/3 mingw: use domain information for default emailJohannes Schindelin via GitGitGadget, Oct 15, 2018
  10. Eric SunshineOct 15, 2018
  11. Johannes SchindelinOct 16, 2018
  12. Junio C HamanoOct 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.