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

Function git_configset_get_value

config.c:1836–1856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1834}
1835
1836int git_configset_get_value(struct config_set *set, const char *key,
1837 const char **value, struct key_value_info *kvi)
1838{
1839 const struct string_list *values = NULL;
1840 int ret;
1841 struct string_list_item item;
1842 /*
1843 * Follows "last one wins" semantic, i.e., if there are multiple matches for the
1844 * queried key in the files of the configset, the value returned will be the last
1845 * value in the value list for that key.
1846 */
1847 if ((ret = git_configset_get_value_multi(set, key, &values)))
1848 return ret;
1849
1850 assert(values->nr > 0);
1851 item = values->items[values->nr - 1];
1852 *value = item.string;
1853 if (kvi)
1854 *kvi = *((struct key_value_info *)item.util);
1855 return 0;
1856}
1857
1858int git_configset_get_value_multi(struct config_set *set, const char *key,
1859 const struct string_list **dest)

Callers 12

git_configset_get_stringFunction · 0.85
git_configset_get_intFunction · 0.85
git_configset_get_uintFunction · 0.85
git_configset_get_ulongFunction · 0.85
git_configset_get_boolFunction · 0.85
repo_config_get_valueFunction · 0.85
init_worktree_configFunction · 0.85
cmd__configFunction · 0.85

Calls 1

Tested by 1

cmd__configFunction · 0.68