summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-17 21:22:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-17 21:22:17 (GMT)
commit5d55554b1d099f3ae5e74f6d058edb55161510de (patch)
treef3c4a640addac61a756693580814627f76ea62e6 /remote.c
parent9f3f38769d49255d3fbf97f35a0dec591de17db3 (diff)
parent145d59f48233c64cb8a9262c9f1451cc7d66b530 (diff)
downloadgit-5d55554b1d099f3ae5e74f6d058edb55161510de.zip
git-5d55554b1d099f3ae5e74f6d058edb55161510de.tar.gz
git-5d55554b1d099f3ae5e74f6d058edb55161510de.tar.bz2
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 'remote.c')
-rw-r--r--remote.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index 5c4666b..593ce29 100644
--- a/remote.c
+++ b/remote.c
@@ -369,7 +369,8 @@ static int handle_config(const char *key, const char *value, void *cb)
}
remote = make_remote(name, namelen);
remote->origin = REMOTE_CONFIG;
- if (current_config_scope() == CONFIG_SCOPE_REPO)
+ if (current_config_scope() == CONFIG_SCOPE_LOCAL ||
+ current_config_scope() == CONFIG_SCOPE_WORKTREE)
remote->configured_in_repo = 1;
if (!strcmp(subkey, "mirror"))
remote->mirror = git_config_bool(key, value);