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

Function kustomize_remote_entry

src/pipeline/pass_pkgmap.c:2226–2238  ·  view source on GitHub ↗

A kustomization entry naming a remote base -- a URL, a go-getter host path, * an ssh remote or a `?ref=` pin -- lies outside the repository. */

Source from the content-addressed store, hash-verified

2224/* A kustomization entry naming a remote base -- a URL, a go-getter host path,
2225 * an ssh remote or a `?ref=` pin -- lies outside the repository. */
2226static bool kustomize_remote_entry(const char *entry) {
2227 static const char *const hosts[] = {"github.com/", "gitlab.com/", "bitbucket.org/", "git@",
2228 NULL};
2229 if (strstr(entry, "://") || strstr(entry, "?ref=") || strstr(entry, ".git/")) {
2230 return true;
2231 }
2232 for (int i = 0; hosts[i]; i++) {
2233 if (strncmp(entry, hosts[i], strlen(hosts[i])) == 0) {
2234 return true;
2235 }
2236 }
2237 return false;
2238}
2239
2240static bool kustomize_file_label(const char *label) {
2241 return label && (strcmp(label, "Module") == 0 || strcmp(label, "File") == 0);

Callers 1

resolve_kustomize_entryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected