From 6021e1d1580169532512772afbb86996f717f4ae Mon Sep 17 00:00:00 2001 From: Glen Choo Date: Wed, 28 Jun 2023 19:26:23 +0000 Subject: config.c: pass ctx in configsets Pass config_context to config callbacks in configset_iter(), trivially setting the .kvi member to the cached key_value_info. Then, in config callbacks that are only used with configsets, use the .kvi member to replace calls to current_config_*(), and delete current_config_line() because it has no remaining callers. This leaves builtin/config.c and config.c as the only remaining users of current_config_*(). Signed-off-by: Glen Choo Signed-off-by: Junio C Hamano --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.h') diff --git a/config.h b/config.h index cd30125a8a..ddf147bb2d 100644 --- a/config.h +++ b/config.h @@ -387,7 +387,7 @@ int git_config_parse_parameter(const char *, config_fn_t fn, void *data); enum config_scope current_config_scope(void); const char *current_config_origin_type(void); const char *current_config_name(void); -int current_config_line(void); +const char *config_origin_type_name(enum config_origin_type type); /* * Match and parse a config key of the form: -- cgit v1.2.3