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

Function git_global_config

config.c:1505–1523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1503}
1504
1505char *git_global_config(void)
1506{
1507 char *user_config, *xdg_config;
1508
1509 git_global_config_paths(&user_config, &xdg_config);
1510 if (!user_config) {
1511 free(xdg_config);
1512 return NULL;
1513 }
1514
1515 if (access_or_warn(user_config, R_OK, 0) && xdg_config &&
1516 !access_or_warn(xdg_config, R_OK, 0)) {
1517 free(user_config);
1518 return xdg_config;
1519 } else {
1520 free(xdg_config);
1521 return user_config;
1522 }
1523}
1524
1525void git_global_config_paths(char **user_out, char **xdg_out)
1526{

Callers 4

add_config_scope_argFunction · 0.85
location_options_initFunction · 0.85
maintenance_registerFunction · 0.85
maintenance_unregisterFunction · 0.85

Calls 2

git_global_config_pathsFunction · 0.85
access_or_warnFunction · 0.85

Tested by

no test coverage detected