MCPcopy Create free account
hub / github.com/git/git / tr2_load_env_vars

Function tr2_load_env_vars

trace2/tr2_cfg.c:49–64  ·  view source on GitHub ↗

* Parse a string containing a comma-delimited list of environment variable * names into a string list. */

Source from the content-addressed store, hash-verified

47 * names into a string list.
48 */
49static size_t tr2_load_env_vars(void)
50{
51 const char *varlist;
52
53 if (tr2_cfg_env_vars_loaded)
54 return tr2_cfg_env_vars.nr;
55 tr2_cfg_env_vars_loaded = 1;
56
57 varlist = tr2_sysenv_get(TR2_SYSENV_ENV_VARS);
58 if (!varlist || !*varlist)
59 return tr2_cfg_env_vars.nr;
60
61 string_list_split_f(&tr2_cfg_env_vars, varlist, ",", -1,
62 STRING_LIST_SPLIT_TRIM);
63 return tr2_cfg_env_vars.nr;
64}
65
66void tr2_cfg_free_env_vars(void)
67{

Callers 1

tr2_list_env_vars_flFunction · 0.85

Calls 2

tr2_sysenv_getFunction · 0.85
string_list_split_fFunction · 0.85

Tested by

no test coverage detected