X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=diff-lib.c;h=23c8d351b3aa5912c49c9da0eecd8727cf06ac72;hb=02bf766cc5d7580ce17dfab36fce976bfd06585b;hp=83fce51518854754ee6f4d95cca86d61cc10e4cf;hpb=c0e286a3d24045fc32824f7790d600e9a0fe312c;p=thirdparty%2Fgit.git 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);