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. */
| 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. */ |
| 2226 | static 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 | |
| 2240 | static bool kustomize_file_label(const char *label) { |
| 2241 | return label && (strcmp(label, "Module") == 0 || strcmp(label, "File") == 0); |
no outgoing calls
no test coverage detected