| 1306 | } |
| 1307 | |
| 1308 | int 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 | |
| 1331 | int git_config_expiry_date(timestamp_t *timestamp, const char *var, const char *value) |
| 1332 | { |
no test coverage detected