X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=repo-config.c;h=8c0bb2029171e35d3f6cd39932ee035aca85bb0c;hb=refs%2Fheads%2Fpu;hp=59c2bfbf61376e4b3629afd1a7e7a1a3b74bc025;hpb=ea71d197c3d265f32aae225a5fd17f4ef617c216;p=git.git diff --git a/repo-config.c b/repo-config.c index 59c2bfbf..8c0bb202 100644 --- a/repo-config.c +++ b/repo-config.c @@ -97,7 +97,8 @@ static int get_value(const char* key_, const char* regex_) if (do_all && global) git_config_from_file(show_config, global); - git_config_from_file(show_config, git_path("config")); + if (!git_ignore_local_config) + git_config_from_file(show_config, git_path("config")); if (!do_all && !seen) git_config_from_file(show_config, global); @@ -125,6 +126,8 @@ int main(int argc, const char **argv) type = T_BOOL; else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) return git_config(show_all_config); + else if (!strcmp(argv[1], "--no-local")) + git_ignore_local_config = 1; else break; argc--;