cf->origin_type either is CONFIG_ORIGIN_CMDLINE, or it's something else.
Don't override that.
Signed-off-by: Felipe Contreras <redacted>
---
config.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/config.c b/config.c
index 9172c96c54..666fb2c689 100644
--- a/config.c
+++ b/config.c
@@ -2087,13 +2087,12 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha
if (cf->name) {
kv_info->filename = strintern(cf->name);
kv_info->linenr = cf->linenr;
- kv_info->origin_type = cf->origin_type;
} else {
/* for values read from `git_config_from_parameters()` */
kv_info->filename = NULL;
kv_info->linenr = -1;
- kv_info->origin_type = CONFIG_ORIGIN_CMDLINE;
}
+ kv_info->origin_type = cf->origin_type;
kv_info->scope = current_parsing_scope;
si->util = kv_info;
--
2.32.0.94.g4574ca548c