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

Function trim_newlines

src/git/git_context.c:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32static void trim_newlines(char *s) {
33 if (!s) {
34 return;
35 }
36 size_t n = strlen(s);
37 while (n > 0 && (s[n - 1] == '\n' || s[n - 1] == '\r')) {
38 s[--n] = '\0';
39 }
40}
41
42static bool git_validate_repo_path(const char *repo_path) {
43 if (!cbm_validate_shell_arg(repo_path)) {

Callers 1

git_captureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected