MCPcopy Index your code
hub / github.com/git/git / forbid_remote_url

Function forbid_remote_url

config.c:351–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static int forbid_remote_url(const char *var, const char *value UNUSED,
352 const struct config_context *ctx UNUSED,
353 void *data UNUSED)
354{
355 const char *remote_name;
356 size_t remote_name_len;
357 const char *key;
358
359 if (!parse_config_key(var, "remote", &remote_name, &remote_name_len,
360 &key) &&
361 remote_name &&
362 !strcmp(key, "url"))
363 die(_("remote URLs cannot be configured in file directly or indirectly included by includeIf.hasconfig:remote.*.url"));
364 return 0;
365}
366
367static int at_least_one_url_matches_glob(const char *glob, int glob_len,
368 struct string_list *remote_urls)

Callers

nothing calls this directly

Calls 2

parse_config_keyFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected