MCPcopy Index your code
hub / github.com/git/git / xgetpwuid_self

Function xgetpwuid_self

ident.c:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39#endif
40
41static struct passwd *xgetpwuid_self(int *is_bogus)
42{
43 struct passwd *pw;
44
45 errno = 0;
46 pw = getpwuid(getuid());
47 if (!pw) {
48 static struct passwd fallback;
49 fallback.pw_name = (char *) "unknown";
50#ifndef NO_GECOS_IN_PWENT
51 fallback.pw_gecos = (char *) "Unknown";
52#endif
53 pw = &fallback;
54 if (is_bogus)
55 *is_bogus = 1;
56 }
57 return pw;
58}
59
60static void copy_gecos(const struct passwd *w, struct strbuf *name)
61{

Callers 3

ident_default_nameFunction · 0.85
ident_default_emailFunction · 0.85
fmt_identFunction · 0.85

Calls 2

getpwuidFunction · 0.85
getuidFunction · 0.85

Tested by

no test coverage detected