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

Function git_env_name_equals

src/foundation/git_env.c:46–57  ·  view source on GitHub ↗

Does the name part of `entry` (up to '=' or `name_len` chars) equal `var`? */

Source from the content-addressed store, hash-verified

44
45/* Does the name part of `entry` (up to '=' or `name_len` chars) equal `var`? */
46static bool git_env_name_equals(const char *entry, size_t name_len, const char *var) {
47 size_t var_len = strlen(var);
48 if (name_len != var_len) {
49 return false;
50 }
51 for (size_t i = 0; i < var_len; i++) {
52 if (git_env_fold(entry[i]) != var[i]) {
53 return false;
54 }
55 }
56 return true;
57}
58
59static bool git_env_name_is_repo_local(const char *name, size_t name_len) {
60 for (size_t i = 0; i < CBM_GIT_REPO_ENV_VAR_COUNT; i++) {

Callers 2

Calls 1

git_env_foldFunction · 0.85

Tested by

no test coverage detected