| 2559 | } |
| 2560 | |
| 2561 | void git_die_config(struct repository *r, const char *key, const char *err, ...) |
| 2562 | { |
| 2563 | const struct string_list *values; |
| 2564 | struct key_value_info *kv_info; |
| 2565 | report_fn error_fn = get_error_routine(); |
| 2566 | |
| 2567 | if (err) { |
| 2568 | va_list params; |
| 2569 | va_start(params, err); |
| 2570 | error_fn(err, params); |
| 2571 | va_end(params); |
| 2572 | } |
| 2573 | if (repo_config_get_value_multi(r, key, &values)) |
| 2574 | BUG("for key '%s' we must have a value to report on", key); |
| 2575 | kv_info = values->items[values->nr - 1].util; |
| 2576 | git_die_config_linenr(key, kv_info->filename, kv_info->linenr); |
| 2577 | } |
| 2578 | |
| 2579 | /* |
| 2580 | * Find all the stuff for repo_config_set() below. |
no test coverage detected