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

Function gf_absolute

src/mcp/test_impact_git.c:106–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static bool gf_absolute(const char *path) {
107 if (!path || !path[0])
108 return false;
109#ifdef _WIN32
110 bool has_prefix = path[1] && path[2];
111 bool drive = has_prefix &&
112 ((path[0] >= 'A' && path[0] <= 'Z') || (path[0] >= 'a' && path[0] <= 'z')) &&
113 path[1] == ':' && (path[2] == '/' || path[2] == '\\');
114 bool unc = has_prefix && (path[0] == '/' || path[0] == '\\') &&
115 (path[1] == '/' || path[1] == '\\') && path[2] != '/' && path[2] != '\\';
116 return drive || unc;
117#else
118 return path[0] == '/';
119#endif
120}
121
122static bool gf_native_executable(const char *path) {
123 if (!gf_absolute(path))

Callers 4

gf_native_executableFunction · 0.70
gf_private_directoryFunction · 0.70
gf_rev_metadataFunction · 0.70
cbm_git_facts_openFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected