summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-12-07 18:26:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-07 21:25:16 (GMT)
commitf5c39c3268107e1f3def70709d509fd24282832c (patch)
treef55dcb418820375d5548d7215744fbac6e1cfe72 /config.c
parent24f6e6d626b0125f741880918fb3b9b85f607a79 (diff)
downloadgit-f5c39c3268107e1f3def70709d509fd24282832c.zip
git-f5c39c3268107e1f3def70709d509fd24282832c.tar.gz
git-f5c39c3268107e1f3def70709d509fd24282832c.tar.bz2
config API: use get_error_routine(), not vreportf()
Change the git_die_config() function added in 5a80e97c827 (config: add `git_die_config()` to the config-set API, 2014-08-07) to use the public callbacks in the usage.[ch] API instead of the the underlying vreportf() function. In preceding commits the rest of the vreportf() users outside of usage.c was migrated to die_message(), so we can now make it "static". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.c b/config.c
index c5873f3..e96b8fd 100644
--- a/config.c
+++ b/config.c
@@ -2555,11 +2555,12 @@ void git_die_config(const char *key, const char *err, ...)
{
const struct string_list *values;
struct key_value_info *kv_info;
+ report_fn error_fn = get_error_routine();
if (err) {
va_list params;
va_start(params, err);
- vreportf("error: ", err, params);
+ error_fn(err, params);
va_end(params);
}
values = git_config_get_value_multi(key);