MCPcopy Create free account
hub / github.com/git/git / git_user_agent_sanitized

Function git_user_agent_sanitized

version.c:62–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62const char *git_user_agent_sanitized(void)
63{
64 static const char *agent = NULL;
65
66 if (!agent) {
67 struct strbuf buf = STRBUF_INIT;
68
69 strbuf_addstr(&buf, git_user_agent());
70
71 if (!getenv("GIT_USER_AGENT")) {
72 strbuf_addch(&buf, '-');
73 strbuf_addstr(&buf, os_info());
74 }
75 redact_non_printables(&buf);
76 agent = strbuf_detach(&buf, NULL);
77 }
78
79 return agent;
80}
81
82int get_uname_info(struct strbuf *buf, unsigned int full)
83{

Callers 8

find_commonFunction · 0.85
write_v0_refFunction · 0.85
send_capabilitiesFunction · 0.85
send_packFunction · 0.85
agent_advertiseFunction · 0.85
show_refFunction · 0.85

Calls 6

strbuf_addstrFunction · 0.85
git_user_agentFunction · 0.85
strbuf_addchFunction · 0.85
os_infoFunction · 0.85
redact_non_printablesFunction · 0.85
strbuf_detachFunction · 0.85

Tested by

no test coverage detected