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

Function git_config_pathname

config.c:1308–1329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1306}
1307
1308int git_config_pathname(char **dest, const char *var, const char *value)
1309{
1310 bool is_optional;
1311 char *path;
1312
1313 if (!value)
1314 return config_error_nonbool(var);
1315
1316 is_optional = skip_prefix(value, ":(optional)", &value);
1317 path = interpolate_path(value, 0);
1318 if (!path)
1319 die(_("failed to expand user dir in: '%s'"), value);
1320
1321 if (is_optional && is_missing_file(path)) {
1322 free(path);
1323 *dest = NULL;
1324 return 0;
1325 }
1326
1327 *dest = path;
1328 return 0;
1329}
1330
1331int git_config_expiry_date(timestamp_t *timestamp, const char *var, const char *value)
1332{

Callers 14

safe_directory_cbFunction · 0.85
template_dir_cbFunction · 0.85
fetch_pack_fsck_configFunction · 0.85
http_optionsFunction · 0.85
git_default_core_configFunction · 0.85
git_fsck_configFunction · 0.85
git_diff_ui_configFunction · 0.85
git_gpg_configFunction · 0.85
format_config_pathFunction · 0.85
git_format_configFunction · 0.85
receive_pack_configFunction · 0.85

Calls 4

config_error_nonboolFunction · 0.85
interpolate_pathFunction · 0.85
is_missing_fileFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected