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

Function trim_newlines

src/git/git_context.c:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

git_capture_intoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected