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

Function wt_git

tests/test_watcher.c:37–44  ·  view source on GitHub ↗

Portable git: `git -C " " ` with identity + non-interactive * config injected via -c, so it needs no global config and no POSIX shell * (runs under cmd.exe on Windows). Returns the git exit status. */

Source from the content-addressed store, hash-verified

35 * config injected via -c, so it needs no global config and no POSIX shell
36 * (runs under cmd.exe on Windows). Returns the git exit status. */
37static int wt_git(const char *dir, const char *args) {
38 char cmd[1024];
39 snprintf(cmd, sizeof(cmd),
40 "git -C \"%s\" -c user.name=t -c user.email=t@t.io "
41 "-c init.defaultBranch=master -c commit.gpgsign=false %s",
42 dir, args);
43 return system(cmd);
44}
45/* Build "<dir>/<rel>" into buf (forward slashes work on Windows + git). */
46static const char *wt_path(char *buf, size_t n, const char *dir, const char *rel) {
47 snprintf(buf, n, "%s/%s", dir, rel);

Callers 1

test_watcher.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected