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

Function git_strdup

src/git/git_context.c:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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