diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-12-28 10:41:41 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-01-15 15:38:29 -0800 |
| commit | 0aa9d8aa6ce429f0fa04e1ca819ed766c211e242 (patch) | |
| tree | a1300182f22bf55f45b5769673cabc6535666dd7 /diff-lib.c | |
| parent | Merge branch 'sb/more-repo-in-api' into md/list-objects-filter-by-depth (diff) | |
| parent | rebase-interactive.c: remove the_repository references (diff) | |
| download | git-0aa9d8aa6ce429f0fa04e1ca819ed766c211e242.tar.gz git-0aa9d8aa6ce429f0fa04e1ca819ed766c211e242.zip | |
Merge branch 'nd/the-index' into md/list-objects-filter-by-depth
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); |
