"Glen Choo via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > From: Glen Choo <chooglen@xxxxxxxxxx> For some reason, I was having difficulty understanding the commit message, so I looked at the code and I think I could reason out the purpose of this patch. It is 2-fold: - teach git_config_from_file_with_options() to supply information to its callbacks through a kvi argument - its kvi argument requires a scope; get it not through current_config_scope() but through an argument And as a corollary of the latter point, the scope is UNKNOWN when no global scope is set by the surrounding code (if a scope is set by the surrounding code, use that instead). Unlike the previous patch, since no callers were changed, the only way we can see that this has happened is through reading the code of git_config_from_file_with_options(), but I've read it and it looks good. (Again, as long as current_config_* is all gone at the end of the patch set, then things are fine.) > Refactor out the configset logic that caches "struct config_source" and > "enum config_scope" as a "struct key_value_info", and use it to pass the > "kvi" arg to config callbacks when parsing config files. Get the "enum > config_scope" value by plumbing an additional arg through > git_config_from_file_with_options() and the underlying machinery. > > We do not exercise the "kvi" arg yet because the remaining > current_config_*() callers may be used with config_with_options(), which > may read config from parameters, but parameters don't pass "kvi" yet. > > Signed-off-by: Glen Choo <chooglen@xxxxxxxxxx> Now that I reread this, I can see that it hit all the points that I wrote at the top. So I think no change is needed in the commit message, unless another reviewer also found it unclear. The code itself looks good.