diff options
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/diff-lib.c b/diff-lib.c index 83fce51518..23c8d351b3 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -542,7 +542,7 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt) { struct rev_info revs; - repo_init_revisions(the_repository, &revs, NULL); + repo_init_revisions(opt->repo, &revs, NULL); copy_pathspec(&revs.prune_data, &opt->pathspec); revs.diffopt = *opt; @@ -551,13 +551,14 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt) return 0; } -int index_differs_from(const char *def, const struct diff_flags *flags, +int index_differs_from(struct repository *r, + const char *def, const struct diff_flags *flags, int ita_invisible_in_index) { struct rev_info rev; struct setup_revision_opt opt; - repo_init_revisions(the_repository, &rev, NULL); + repo_init_revisions(r, &rev, NULL); memset(&opt, 0, sizeof(opt)); opt.def = def; setup_revisions(0, NULL, &rev, &opt); |