dir.c: remove an implicit dependency on the_index in pathspec code
[gitweb.git] / builtin / config.c
index 704879a70c4db214d7b10232e781968a3f4416f5..2c93a289a7255c69260a806cc064f00170453531 100644 (file)
@@ -402,7 +402,7 @@ static char *normalize_value(const char *key, const char *value)
                return xstrdup(value);
        }
 
-       die("BUG: cannot normalize type %d", type);
+       BUG("cannot normalize type %d", type);
 }
 
 static int get_color_found;
@@ -606,6 +606,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)
        if (use_local_config && nongit)
                die(_("--local can only be used inside a git repository"));
 
+       if (given_config_source.blob && nongit)
+               die(_("--blob can only be used inside a git repository"));
+
        if (given_config_source.file &&
                        !strcmp(given_config_source.file, "-")) {
                given_config_source.file = NULL;