userdiff.c: remove implicit dependency on the_index
[gitweb.git] / revision.c
index 0627494378dcf6d921af59cc83d02e6a6feb0030..d70587678c278b93ed304f3e8cc5a052d7f5254a 100644 (file)
@@ -877,7 +877,7 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
                return;
 
        left_first = left_count < right_count;
-       init_patch_ids(&ids);
+       init_patch_ids(the_repository, &ids);
        ids.diffopts.pathspec = revs->diffopt.pathspec;
 
        /* Compute patch-ids for one side */
@@ -1464,11 +1464,11 @@ 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);
+       repo_diff_setup(the_repository, &revs->diffopt);
        if (prefix && !revs->diffopt.prefix) {
                revs->diffopt.prefix = prefix;
                revs->diffopt.prefix_length = strlen(prefix);
@@ -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;