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

Function copy_gecos

ident.c:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static void copy_gecos(const struct passwd *w, struct strbuf *name)
61{
62 const char *src;
63
64 /* Traditionally GECOS field had office phone numbers etc, separated
65 * with commas. Also & stands for capitalized form of the login name.
66 */
67
68 for (src = get_gecos(w); *src && *src != ','; src++) {
69 int ch = *src;
70 if (ch != '&')
71 strbuf_addch(name, ch);
72 else {
73 /* Sorry, Mr. McDonald... */
74 strbuf_addch(name, toupper(*w->pw_name));
75 strbuf_addstr(name, w->pw_name + 1);
76 }
77 }
78}
79
80static int add_mailname_host(struct strbuf *buf)
81{

Callers 1

ident_default_nameFunction · 0.85

Calls 2

strbuf_addchFunction · 0.85
strbuf_addstrFunction · 0.85

Tested by

no test coverage detected