Merge branch 'mh/avoid-rewriting-packed-refs' into maint
[gitweb.git] / builtin / grep.c
index a70d8e2fba9f4e371a069bd801d20dcfe195f485..5a6cfe6b45b06b6b75ea399a83cb8dcf7e197141 100644 (file)
@@ -275,7 +275,7 @@ static int wait_all(void)
 static int grep_cmd_config(const char *var, const char *value, void *cb)
 {
        int st = grep_config(var, value, cb);
-       if (git_default_config(var, value, cb) < 0)
+       if (git_color_default_config(var, value, cb) < 0)
                st = -1;
 
        if (!strcmp(var, "grep.threads")) {
@@ -431,7 +431,9 @@ static int grep_submodule(struct grep_opt *opt, struct repository *superproject,
         * store is no longer global and instead is a member of the repository
         * object.
         */
+       grep_read_lock();
        add_to_alternates_memory(submodule.objectdir);
+       grep_read_unlock();
 
        if (oid) {
                struct object *object;
@@ -1048,10 +1050,6 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
        }
 #endif
 
-       if (recurse_submodules) {
-               gitmodules_config();
-       }
-
        if (show_in_pager && (cached || list.nr))
                die(_("--open-files-in-pager only works on the worktree"));