summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLibravatar Matthew Rogers <mattr94@gmail.com>2020-02-10 00:30:58 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-10 10:49:12 -0800
commit9a83d088ee00dcdab171b2020ab334e369437a33 (patch)
tree8b21354f71400dc4fca02ff91bd76210b3c91b02 /config.c
parentconfig: teach git_config_source to remember its scope (diff)
downloadtgif-9a83d088ee00dcdab171b2020ab334e369437a33.tar.xz
submodule-config: add subomdule config scope
Before the changes to teach git_config_source to remember scope information submodule-config.c never needed to consider the question of config scope. Even though zeroing out git_config_source is still correct and preserved the previous behavior of setting the scope to CONFIG_SCOPE_UNKNOWN, it's better to be explicit about such situations by explicitly setting the scope. As none of the current config_scope enumerations make sense we create CONFIG_SCOPE_SUBMODULE to describe the situation. Signed-off-by: Matthew Rogers <mattr94@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.c b/config.c
index 9b6afca210..18a6bdd9ff 100644
--- a/config.c
+++ b/config.c
@@ -3311,6 +3311,8 @@ const char *config_scope_name(enum config_scope scope)
return "worktree";
case CONFIG_SCOPE_COMMAND:
return "command";
+ case CONFIG_SCOPE_SUBMODULE:
+ return "submodule";
default:
return "unknown";
}