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

Function config_parse_pair

config.c:620–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620static int config_parse_pair(const char *key, const char *value,
621 struct key_value_info *kvi,
622 config_fn_t fn, void *data)
623{
624 char *canonical_name;
625 int ret;
626 struct config_context ctx = {
627 .kvi = kvi,
628 };
629
630 if (!strlen(key))
631 return error(_("empty config key"));
632 if (git_config_parse_key(key, &canonical_name, NULL))
633 return -1;
634
635 ret = (fn(canonical_name, value, &ctx, data) < 0) ? -1 : 0;
636 free(canonical_name);
637 return ret;
638}
639
640
641/* for values read from `git_config_from_parameters()` */

Callers 3

parse_config_env_listFunction · 0.85

Calls 2

errorFunction · 0.85
git_config_parse_keyFunction · 0.85

Tested by

no test coverage detected