summary refs log tree commit diff
path: root/submodule-config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-17 13:22:17 -0800
committerJunio C Hamano <gitster@pobox.com>2020-02-17 13:22:17 -0800
commit5d55554b1d099f3ae5e74f6d058edb55161510de (patch)
treef3c4a640addac61a756693580814627f76ea62e6 /submodule-config.c
parent9f3f38769d49255d3fbf97f35a0dec591de17db3 (diff)
parent145d59f48233c64cb8a9262c9f1451cc7d66b530 (diff)
Merge branch 'mr/show-config-scope'
"git config" learned to show in which "scope", in addition to in
which file, each config setting comes from.

* mr/show-config-scope:
  config: add '--show-scope' to print the scope of a config value
  submodule-config: add subomdule config scope
  config: teach git_config_source to remember its scope
  config: preserve scope in do_git_config_sequence
  config: clarify meaning of command line scoping
  config: split repo scope to local and worktree
  config: make scope_name non-static and rename it
  t1300: create custom config file without special characters
  t1300: fix over-indented HERE-DOCs
  config: fix typo in variable name
Diffstat (limited to 'submodule-config.c')
-rw-r--r--submodule-config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/submodule-config.c b/submodule-config.c
index bd5e14ab20..4d1c92d582 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -635,7 +635,9 @@ static void submodule_cache_check_init(struct repository *repo)
 static void config_from_gitmodules(config_fn_t fn, struct repository *repo, void *data)
 {
 	if (repo->worktree) {
-		struct git_config_source config_source = { 0 };
+		struct git_config_source config_source = {
+			0, .scope = CONFIG_SCOPE_SUBMODULE
+		};
 		const struct config_options opts = { 0 };
 		struct object_id oid;
 		char *file;