grep.c: remove implicit dependency on the_index
[gitweb.git] / revision.c
index 0627494378dcf6d921af59cc83d02e6a6feb0030..3457064ff3cd59d075ac537ab0651b86f2232be3 100644 (file)
@@ -1464,8 +1464,8 @@ void init_revisions(struct rev_info *revs, const char *prefix)
        revs->commit_format = CMIT_FMT_DEFAULT;
        revs->expand_tabs_in_log_default = 8;
 
-       init_grep_defaults();
-       grep_init(&revs->grep_filter, prefix);
+       init_grep_defaults(the_repository);
+       grep_init(&revs->grep_filter, the_repository, prefix);
        revs->grep_filter.status_only = 1;
 
        diff_setup(&revs->diffopt);
@@ -1517,7 +1517,7 @@ static void prepare_show_merge(struct rev_info *revs)
                const struct cache_entry *ce = active_cache[i];
                if (!ce_stage(ce))
                        continue;
-               if (ce_path_match(ce, &revs->prune_data, NULL)) {
+               if (ce_path_match(&the_index, ce, &revs->prune_data, NULL)) {
                        prune_num++;
                        REALLOC_ARRAY(prune, prune_num);
                        prune[prune_num-2] = ce->name;