summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-11-10 05:49:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-12 05:50:06 (GMT)
commitffc00a48efe8f591a05f8e7b61f632bcaf098dde (patch)
tree7f45042103cf0de842143abb2d62f790f586dbbc /diff-lib.c
parent385cb64ff3598451ac3019443b364f49b8395e82 (diff)
downloadgit-ffc00a48efe8f591a05f8e7b61f632bcaf098dde.zip
git-ffc00a48efe8f591a05f8e7b61f632bcaf098dde.tar.gz
git-ffc00a48efe8f591a05f8e7b61f632bcaf098dde.tar.bz2
diff-lib.c: remove the_repository references
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 83fce51..23c8d35 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);