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

Function commit_add_file

src/pipeline/pass_githistory.c:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91} commit_t;
92
93static void commit_add_file(commit_t *c, const char *file) {
94 if (c->count >= c->cap) {
95 c->cap = c->cap ? c->cap * PAIR_LEN : GH_INIT_CAP;
96 c->files = safe_realloc(c->files, c->cap * sizeof(char *));
97 }
98 c->files[c->count++] = strdup(file);
99}
100
101static void commit_free(commit_t *c) {
102 for (int i = 0; i < c->count; i++) {

Callers 1

parse_git_logFunction · 0.85

Calls 1

safe_reallocFunction · 0.85

Tested by

no test coverage detected