revision.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
26d024ecf0
commit
2abf350385
@ -542,7 +542,7 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
|
||||
{
|
||||
struct rev_info revs;
|
||||
|
||||
init_revisions(&revs, NULL);
|
||||
repo_init_revisions(the_repository, &revs, NULL);
|
||||
copy_pathspec(&revs.prune_data, &opt->pathspec);
|
||||
revs.diffopt = *opt;
|
||||
|
||||
@ -557,7 +557,7 @@ int index_differs_from(const char *def, const struct diff_flags *flags,
|
||||
struct rev_info rev;
|
||||
struct setup_revision_opt opt;
|
||||
|
||||
init_revisions(&rev, NULL);
|
||||
repo_init_revisions(the_repository, &rev, NULL);
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
opt.def = def;
|
||||
setup_revisions(0, NULL, &rev, &opt);
|
||||
|
||||
Reference in New Issue
Block a user