Merge branch 'jk/diff-blob' into maint
[gitweb.git] / builtin / config.c
index 3a554ad50ca60cd327ce94433022f8d42f024f52..7f6c25d4d95b37f7785e0b6872d059095548c87f 100644 (file)
@@ -496,6 +496,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                usage_with_options(builtin_config_usage, builtin_config_options);
        }
 
+       if (use_local_config && nongit)
+               die(_("--local can only be used inside a git repository"));
+
        if (given_config_source.file &&
                        !strcmp(given_config_source.file, "-")) {
                given_config_source.file = NULL;