MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / git_strdup

Function git_strdup

src/git/git_context.c:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17};
18
19static char *git_strdup(const char *s) {
20 if (!s) {
21 s = "";
22 }
23 size_t n = strlen(s) + 1;
24 char *out = (char *)malloc(n);
25 if (!out) {
26 return NULL;
27 }
28 memcpy(out, s, n);
29 return out;
30}
31
32static void trim_newlines(char *s) {
33 if (!s) {

Callers 5

git_captureFunction · 0.85
join_root_relativeFunction · 0.85
derive_canonical_rootFunction · 0.85
slug_from_branchFunction · 0.85
cbm_git_context_resolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected