Re: [PATCH 3/3] ident: loosen getpwuid error in non-strict mode

2015-12-14 Thread Jeff King
On Thu, Dec 10, 2015 at 04:41:29PM -0500, Jeff King wrote: > -static struct passwd *xgetpwuid_self(void) > +static struct passwd *xgetpwuid_self(int *is_bogus) > { > struct passwd *pw; > > errno = 0; > pw = getpwuid(getuid()); > - if (!pw) > - die(_("unable to

[PATCH 3/3] ident: loosen getpwuid error in non-strict mode

2015-12-10 Thread Jeff King
If the user has not specified an identity and we have to turn to getpwuid() to find the username or gecos field, we die immediately when getpwuid fails (e.g., because the user does not exist). This is OK for making a commit, where we have set IDENT_STRICT and would want to bail on bogus input.