| 341 | } |
| 342 | |
| 343 | static int format_config_path(struct strbuf *buf, |
| 344 | const char *key_, |
| 345 | const char *value_, |
| 346 | int gently) |
| 347 | { |
| 348 | char *v; |
| 349 | |
| 350 | if (git_config_pathname(&v, key_, value_) < 0) |
| 351 | return -1; |
| 352 | |
| 353 | if (v) |
| 354 | strbuf_addstr(buf, v); |
| 355 | else |
| 356 | return gently ? -1 : 1; /* :(optional)no-such-file */ |
| 357 | |
| 358 | free(v); |
| 359 | return 0; |
| 360 | } |
| 361 | |
| 362 | static int format_config_expiry_date(struct strbuf *buf, |
| 363 | const char *key_, |
no test coverage detected